PHP output compression
By Rayed
PHP 4.0.5 and above added new feature to compress your PHP pages on the fly, all you need is the zlib extension, this how I configured it.
# vi /usr/local/etc/php.ini
:
zlib.output_compression = On
:
# apachectl graceful
Alriyadh.com front page size dropped from 20.5 K to 5.6 K, according to my tests almost 50% of browser don’t support compression, IE for instance turn off gzip compression support if you have bad firewalls (Zone Alarm), and even some IE extensions (specially ad wares) turn off the compression.
I used to have compression support inside my caching library, but I guess I’ll turn it of in favour of PHP native support, the old cache saved around 40% of the website bandwidth, and of course this will make the appear much faster for the users.
I am not sure about the affect of the “on the fly” compression on the processor utilization, but with the new hardware I am not that worried.