Advertisement
Guest User

Untitled

a guest
Jun 4th, 2012
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1.  
  2. #via Html5Boilerplate:
  3. <IfModule mod_deflate.c>
  4.  
  5. # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  6. <IfModule mod_setenvif.c>
  7. <IfModule mod_headers.c>
  8. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  9. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  10. </IfModule>
  11. </IfModule>
  12.  
  13. # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
  14. <IfModule filter_module>
  15. FilterDeclare COMPRESS
  16. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
  17. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
  18. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
  19. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
  20. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
  21. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
  22. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
  23. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
  24. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
  25. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
  26. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
  27. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
  28. FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
  29. FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
  30. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
  31. FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
  32. FilterChain COMPRESS
  33. FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
  34. </IfModule>
  35.  
  36. <IfModule !mod_filter.c>
  37. # Legacy versions of Apache
  38. AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  39. AddOutputFilterByType DEFLATE application/javascript
  40. AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
  41. AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
  42. AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
  43. </IfModule>
  44.  
  45. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement