UnixServerAdmin

Server Administration & Management

How to enable Zlib to get faster site browsing

Everyone want a lightening fast website speed instead of turtle speed. To get faster speed of your website, you may enable zlib or gzip. In this session, you will learn how to enable zlib from your PHP script.

To enable zlib, head to your php.ini file and change the value as below.

=============================
zlib.output_compression=On
zlib.output_compression_level=1
=============================

If your host do not support for php.ini file, you may easily add this to your php script.

=====================================
ini_set(’zlib.output_compression’, ‘On’);
ini_set(’zlib.output_compression_level’, ‘1?);
=====================================

Advertisements

April 3, 2011 Posted by | PHP | , , | Leave a comment