Saving HTTP server bandwidth and increasing speed

If you have some CPU power to spare and you are looking to save some $$$ on the bandwidth bill you have an option for PHP.

Open php.ini (usually located in /usr/local/lib/php.ini) and uncomment the following line:

output_handler = ob_gzhandler

With this value set you will redirect all output to the function, in this case ob_gzhandler that will compress output to the web clients that support using gzip or deflate encoding.

Leave a Reply