PHP: Gzip compression made easy
If you want to speed up your php pages with minimal trouble and maximum results, do this: Source: [Webcodingtech] Put this code in your main header or template file, before EVERYTHING, even doctype. <?php function print_gzipped_page() { global $HTTP_ACCEPT_ENCODING; if( headers_sent() ){ $encoding = false; }elseif( strpos($HTTP_ACCEPT_ENCODING, ‘x-gzip’) !== false ){ $encoding = ‘x-gzip’; [...]
