Matt Mullenweg posted a entry on the wpdevel blog Monday with a link to a article about gzip compression. The article explained that ~15% of users with gzip-capable browsers were not sending an appropriate Accept-Encoding request headers and were loading the uncompressed pages. The article also explains a method Google is using to catch browsers and software that is doing this. I won’t go into the specifics of the method here because http://www.stevesouders.com/blog/2010/07/12/velocity-forcing-gzip-compression/ and http://en.oreilly.com/velocity2010/public/schedule/detail/14334 do a great job of this already. Matt ended the post with “This would make an excellent WordPress plugin.”.
I decided to give myself a little challenge and try to make this plugin work. After reading through the slides of the presentation I set out and wrote a small plugin. After some refining I had the plugin successfully working on all my tests and in multiple browsers.
I want to release the code here for others to use, take a look at and pick apart. While the code has worked during my tests I would like to gather some feedback and have others test the plugin before I recommend it ready for important/live/production-ready sites.
The plugin is released under the GPL license. I will also be submitting it to WordPress Plugins Database. Keep an eye on this space.