CodeIgniter Forums

Full Version: output compression - how to test if it's working?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I see in the config/config.php file that we can turn on output compression:
Code:
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads.  When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| VERY IMPORTANT:  If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts.  For
| compression to work, nothing can be sent before the output buffer is called
| by the output class.  Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = TRUE;

When I turn this on, I get an error:
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
- Please contact the website owners to inform them of this problem.

I can clearly see the warnings and information in the comments above, but am not sure how to resolve this. How can I be sure my site is using gzip compression? Or it reasonable to try and make sure gzip is used?