Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is gzip an actual ZIP file?

Does a gzip contains an archive of the referenced assets, such as external JS, CSS, and images or does it only compress the one file?

If the browser has never seen the site the before and has nothing cached then it seems like a good idea to send over an actual ZIP file that the browser unpacks. Is this how it’s done?

Update: Damn you Gzip! Why can't you unzip an actual ZIP?!

like image 940
Dathan Avatar asked Feb 02 '26 03:02

Dathan


1 Answers

Only compress one file. You need to combine compression (e.g. gz, bz2 or xz) with an archive format (e.g. tar or cpio) to match ZIP's functionality (hence .tar.gz files).

Browsers pipeline multiple requests, they do not request a ZIP file. Browsers do rely on compression.

If you want to learn about this topic, look at the issues being solved by SPDY for a better understanding of the shortcomings of HTTP.

like image 152
Sean Avatar answered Feb 04 '26 23:02

Sean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!