GZip HTML Files


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



Copy this code and paste it in your HTML
  1. <ifmodule mod_deflate.c>
  2. # Insert filter
  3. SetOutputFilter DEFLATE
  4. # Netscape 4.x has some problems...
  5. #BrowserMatch ^Mozilla/4 gzip-only-text/html
  6. # Netscape 4.06-4.08 have some more problems
  7. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  8. # MSIE masquerades as Netscape, but it is fine
  9. BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  10. # Don't compress images
  11. SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
  12. # Make sure proxies don't deliver the wrong content
  13. Header append Vary User-Agent env=!dont-vary
  14. </ifmodule>

URL: http://www.opensourcetutor.com/2009/04/07/how-to-speed-up-magento/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.