Ask HN: What content types do you gzip and why?
I am currently using gzip * at level 9. Standard advice seems to be, do not compress graphics files and PDFs.
I read moot's post yesterday about saving a few transmission bytes and I did an experiment. I got some pages from 6 big web sites and saved all the files and http headers. From the Content-Encoding in the headers they do not seem to gzip any graphics files. When I measured the file sizes with and without compression I found gzip on level 9 gave a total 1.36% saving on JPG, 1.1% on PNG and 6.95% on GIF. Particularly the larger GIFs were worth compressing. I tried excluding the files which increased in size when 'compressed', this could be done automatically on the server, and it made almost no difference to the totals.
I tried gzip on a couple of random PDF files and they gave big savings.
2 comments
[ 1.6 ms ] story [ 16.7 ms ] thread