Is there anyway to gzip with codeigniter? If yes please share Library, plugin or helper... Thankyou!
+5
A:
Uh, just in your config file change compress_output
to TRUE
. I think it uses gzip.
There's also this disclaimer:
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
.
Matthew
2010-08-26 03:00:21
Good answer. Also note that on shared hosts, it could be that the virtual host setup already has gzip enabled on all content. If you then enable gzip in CI, you get double compression, which leads to very strange issues :)
Ferdy
2010-08-30 19:47:49