Gzip Compression In PHP

As I was surfing through the blogosphere today, I came across an article about using gzip to compress CSS files on PHP servers. It got me to thinking: why not just compress everything?

I have implemented the compression scheme on the main page here to test it. Initially, it appears to be a success, cutting down the page size from roughly 22,500 bytes to 8,570 bytes, over a 50% savings. I had to put in a browser detect for Netscape 4, because the post describes how that particular browser seems to have trouble dealing with compressed files. Looking at my logs, it seems like some people are still using Netscape 4…and I always try to make as many people happy as possible.

Managing Your Interrupt Rate as a Tech Lead E-book Cover

Take control of your calendar to get more done! The popular blog post series plus frequently asked questions all in one convenient PDF.

Download the Free E-book!

Managing Your Interrupt Rate as a Tech Lead is a free download that arrives in minutes.