Mozilla ArchiveAPI: display archive contents in Firefox - gHacks Tech News

Mozilla ArchiveAPI: display archive contents in Firefox

Working with archives on the Internet is not the most pleasant of experiences. While there have been attempts in the past to let users view archive contents in the browser, those solutions have been limited to specific web services only. That's a problem for a number of reasons. You can't for instance tell if the archive contains a file that you need, unless you download it to the local computer to open it there unless the site you are downloading it from lists all files included in the archive.

Mozilla's shining new ArchiveAPI resolves some of the issues that you face when working with archive formats on the Internet. Right now, it can be used to retrieve the file list of archives to display all files listed in the archive in the web browser.

The current implementation works with some - but not all - archive formats. Zip file contents can be displayed without issues, while rar and 7z do not seem to be supported right now.

A demonstration of the feature is available. You can use the browse button or drag and drop supported archives on the drag and drop area on the page to have their contents displayed on it.

archiveapi display archive files

It takes a second or so to retrieve the contents of the archive, which suggests that the API does not need to read the full archive to display the contents on the page.

Some file formats, images and text files for instance, are displayed directly on the screen, while other formats, such as executables, are only listed with their name, size and type. The preview feature makes this an interesting option for users who download wallpaper packs or text packs frequently on the Internet. Instead of having to download the full pack to browse through the contents locally, it is now possible to handpick the files that you want to download from the archive without having to download the full package.

ArchiveZip is only integrated in Firefox Aurora and Nightly at the moment. It is however likely that it will make its way into the beta and stable release of the browser before year's end.

What's unclear right now is if the feature will be implemented in a way that Firefox users can interact with archives directly regardless of the web page they are on, or if the feature will be limited to websites that use the new API. It would obviously be more helpful if the option would be available regardless of the domain or website. (Thanks Ken)


We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Previous Post: «
Next Post: »


  1. pd said on October 3, 2012 at 12:29 pm

    this appears to be a new feature but really, all browsers have had hidden decompression for years. web authors can use it to speed up site transport. so all Mozilla is most likely doing is throwing a wrapper around existing code. it would be much more useful if it supported more formats and if they gave web developers a format for bundling many resources into a single http request

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.

Be polite: we do not allow comments that threaten or harass, or are personal attacks. Please leave politics and religion out of discussions!