<< back to index

Make the web faster - zip it

In mid 90s I realized most Flash swf files could be compressed using zip. The resulting file would often be 50% smaller. I sent this suggestion to Macromedia, and I was very happy when the next version of the SWF file format came out, it included LZW compression.

Google has an initiative to make the web faster. They just proposed a new lossy image file format. I was just wondering if something like what SWF does could be also used for HTML. Imagine you pack all your JavaScript, CSS and smaller images inside a resource.zip file. Later, you would target each file inside this zip file like:



This way the browser could download all the resources with just one request. Compare this to many complex sites that make over one hundred requests to the server. CSS sprites would be something from the past.

There are some drawbacks: linking to compressed resources in other domains wouldn't be as easy as today, and crawling by search engines would require decompressing the file first. Uploading asset groups by FTP would also be faster, but then updating a single file would require uploading the complete compressed asset file.

In any case the speed increase would probably be very noticeable if web sites downloaded most of their assets on one request, instead of making hundreds of them.