Bigsmallbig · 21 November 2002

Thanks in part to a nudge from , and in part to a smart little (long since by its author) [see below], the documents on this site are now served gzip compressed (at sizes reduced as much as 75%) to browsers which can handle such data, which I believe is most, though I’m not sure, but I’m fairly sure that browsers which cannot handle such data are sent a plain uncompressed file. I would ask for reports of decompression errors, but if there were any decompression errors the request wouldn’t be visible; such is the nature of compression. If you can read this it works.

UPDATE: Anyone with a recent version of PHP (4.1+) running on their server can easily take advantage of this. Benefits are greatly reduced bandwidth consumption and a much speedier site, especially for readers using modems.

Simply place the following snippet at the very first line of PHP-aware web pages, before <html>:

<?php ob_start("ob_gzhandler"); ?>

And that’s it. Test .

Potential problems and solutions:

*   *   *