enable gzip (zlib) in php


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // METHOD 1: Add a line to your .htaccess file:
  2. // php_flag zlib.output_compression On
  3.  
  4. // METHOD 2: Add or change a line in your php.ini file:
  5. // zlib.output_compression = On
  6.  
  7.  
  8. // METHOD 3: Add a line to the top of your PHP scripts before any output:
  9. ini_set('zlib_output_compression','On');

URL: http://blog.jc21.com/2007-02-08/how-to-use-gzip-to-load-your-site-faster/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.