Gzip your pages to speed up transfert
Gzip is a powerful compression format. You can use it to compress files but also to compress pages send by the web server to the client. All the recent browser support gzip and can uncompress a gzipped page on the fly without your user noticing it.
There is lots of tutorial to enable gzip but none of them were working for me except one: ob_gzhandler
This function is included in standards php installation. If you generate page dynamically from php you can follow this technique to compress the content before it is send by the server:
Add the following at the beginning of your script:
and this at the end:
That’s it. Of course you need to add this to every script you want to be gzipped, or if you use templates, just in the header for the first line and in the footer for the second line. Tested on the gallery and this wordpress blog.
