Posted By

endorfin on 10/14/08


Tagged

htaccess


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Gzip your components


 / Published in: Apache
 

  1. ### For Apache 1 ###
  2.  
  3. mod_gzip_on Yes
  4.  
  5. mod_gzip_item_include mime ^application/x-javascript$
  6. mod_gzip_item_include mime ^application/json$
  7. mod_gzip_item_include mime ^text/.*$
  8.  
  9. mod_gzip_item_include file \.html$
  10. mod_gzip_item_include file \.php$
  11. mod_gzip_item_include file \.js$
  12. mod_gzip_item_include file \.css$
  13. mod_gzip_item_include file \.txt$
  14. mod_gzip_item_include file \.xml$
  15. mod_gzip_item_include file \.json$
  16.  
  17. Header append Vary Accept-Encoding
  18.  
  19. ### For Apache 2 ###
  20.  
  21. AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json
  22. Header append Vary Accept-Encoding

Report this snippet  

You need to login to post a comment.