speed_hta 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #Some Ubilling web interface performance boost
  2. <ifModule mod_deflate.c>
  3. <filesMatch "\.(css|js|x?html?|php)$">
  4. SetOutputFilter DEFLATE
  5. </filesMatch>
  6. </ifModule>
  7. <ifModule mod_expires.c>
  8. ExpiresActive On
  9. ExpiresDefault "access plus 1 seconds"
  10. ExpiresByType image/x-icon "access plus 2592000 seconds"
  11. ExpiresByType image/jpeg "access plus 2592000 seconds"
  12. ExpiresByType image/png "access plus 2592000 seconds"
  13. ExpiresByType image/gif "access plus 2592000 seconds"
  14. ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  15. ExpiresByType text/css "access plus 604800 seconds"
  16. ExpiresByType text/javascript "access plus 216000 seconds"
  17. ExpiresByType application/javascript "access plus 216000 seconds"
  18. ExpiresByType application/x-javascript "access plus 216000 seconds"
  19. ExpiresByType text/html "access plus 600 seconds"
  20. ExpiresByType application/xhtml+xml "access plus 600 seconds"
  21. </ifModule>
  22. <ifModule mod_headers.c>
  23. <filesMatch "\.(ico|jpeg|jpg|png|gif|swf)$">
  24. Header set Cache-Control "max-age=2592000, public"
  25. </filesMatch>
  26. <filesMatch "\.(css)$">
  27. Header set Cache-Control "max-age=604800, public"
  28. </filesMatch>
  29. <filesMatch "\.(js)$">
  30. Header set Cache-Control "max-age=216000, private"
  31. </filesMatch>
  32. <filesMatch "\.(x?html?|php)$">
  33. Header set Cache-Control "max-age=1, no-store, no-cache, private, must-revalidate"
  34. </filesMatch>
  35. </ifModule>
  36. <ifModule mod_headers.c>
  37. Header unset ETag
  38. </ifModule>
  39. FileETag None
  40. <ifModule mod_headers.c>
  41. Header unset Last-Modified
  42. </ifModule>