Gzip Compression Now Enabled

I just enabled Gzip compression via a WP-Cache hack. Gzip compression will decrease the amount of data the server needs to send each time someone visits. The homepage here before was around 29 kilobytes, now it is less than 10. I’d call that a nice decrease. So this blog should be quite a bit snappier now :)

You can enable Gzip compression if you don’t use WP-Cache by using the option in the “Reading” options page.

If you do use WP-Cache (you should use it!), just add this line: “if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);” immediately above the “foreach ($meta->headers as $header) {” line in the wp-cache-phase1.php file.

I found this hack on chrisstormer.com

And yes, Gzip compression even works on good ol’ lame Internet Explorer.

One thing you should know is this only compresses the HTML your blog sends to each user who views your page, it doesn’t do images, CSS files, etc.

Please subscribe, or else I will cry. Do you really want to make a programmer cry?

One Comment

  1. Random Thoughts - 12-1-07 Says:

    […] Dot Com has been gzip compressed for a while now thanks to a nice hack for WP-Cache. Someone asked me why I did this - and this tool answers that […]

Leave a Reply

Note: By submitting your comment you agree to this blog's comment policy.

If you want a little icon next to your name - sign up for one at Gravatar.