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.
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)Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.