Add GZIP to htaccess


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



Copy this code and paste it in your HTML
  1. # compress text, html, javascript, css, xml:
  2. AddOutputFilterByType DEFLATE text/plain
  3. AddOutputFilterByType DEFLATE text/html
  4. AddOutputFilterByType DEFLATE text/xml
  5. AddOutputFilterByType DEFLATE text/css
  6. AddOutputFilterByType DEFLATE application/xml
  7. AddOutputFilterByType DEFLATE application/xhtml+xml
  8. AddOutputFilterByType DEFLATE application/rss+xml
  9. AddOutputFilterByType DEFLATE application/javascript
  10. AddOutputFilterByType DEFLATE application/x-javascript
  11.  
  12. # Or, compress certain file types by extension:
  13. <Files *.html>
  14. SetOutputFilter DEFLATE
  15. </Files>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.