Skip to main content

CodeIgniter GZIP

CodeIgniter is one of the PHP MVC Framework with minimum learning curve best documentation and easy work flow , in CodeIgniter we can easily Enable or Disable GZIP Compression by Changing Config array values (TRUE – Enable and False – Disable ).gzip is a good technique to reduce size of page with size reduction speed increases, faster load is better for SEO

In your config file change compress_output to TRUE. This Enable Output compression , default value is FALSE it means output compress is off by default.


// application/config/config.php
$config['compress_output'] = TRUE;


Note:
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 whites pace 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.

Enable Gzip in Codeigniter / Ajax Issue :

Do not “echo” any values with compression enabled . By using it you may end up with 500 internal

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.