Crucial Paradigm

Call us now 1300 884 839

Member Login
Australia USA

Location: Australia

Crucial Paradigm Australia Official Blog

RSS Feed

How to enable gzip on PHP the easy way!

December 8, 2009

Gzip can reduce page size by an impressive amount, especially for high traffic sites. We have optimised some of customers sites receiving high traffic and have easily been able to reduce bandwidth usage by 60-80%.

If you have zlib compiled into PHP and you are running PHP then the easy way to enable gzip compression is to add the following line to your .htaccess file:

php_value output_handler ob_gzhandler

This will only enable gzip compression on PHP, and not on css, javascript, html, etc files – this needs to be done in the apache config file.

Aaron Weller
Author:


No Comments

Leave a Reply

Copyright 2003-2012 © Crucial Paradigm Pty Ltd, All Rights Reserved