The API is part of the WebAPI, developed for Firefox OS in particular

Oct 4, 2012 14:17 GMT  ·  By

The web is becoming more powerful, but Mozilla isn't content with just a better web, it wants the browser to replace the role operating systems have for most people. That's the idea behind Firefox OS and behind Chrome OS as well, for that matter.

But, while people change the way they work as they move to the cloud or go mobile, there are plenty of tasks that are holding modern platforms back, managing archived files being one of the most boring yet important ones.

This is where the ArchiveAPI comes in. Developed by Mozilla, it, as the name suggests, enables browsers to handle archives.

It's part of the WebAPI set, of course, the series of APIs Mozilla is developing for Firefox OS in particular which are designed to handle things like a phone's dialer, the GPS, file operations and everything else a web app would need to be on par with a native one.

"Basically, we have an ArchiveReader object and when it successfully manages to read the contents of an archive file, we can iterate over them, read out file data, show previews of each file’s content etc.," Mozilla's Robert Nyman explained.

The feature is great if you just want to check out the contents of an archive, or need just some files out of it. With the ArchiveAPI, you can preview images or any other file the browser recognizes, before downloading the archive to your device.

This works for uploading archives as well. The API only handles reading archives, there are no current plans for an API to create archives.

Still, there are plenty of use cases where the feature could come in handy and it could enable more powerful web apps.

While it is part of WebAPI, which is aimed at mobile devices in particular, it already works in the desktop Firefox, it's supported in Firefox 17 Aurora and above. You can check out a demo here.