indikatordesign

Browser Caching

Jan 6th, 2017
111
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Browser Caching
  2. <IfModule mod_expires.c>
  3. ExpiresActive on
  4. ExpiresDefault "access plus 1 month"
  5. # CSS
  6. ExpiresByType text/css "access plus 1 year"
  7. # Data interchange
  8. ExpiresByType application/atom+xml "access plus 1 hour"
  9. ExpiresByType application/rdf+xml "access plus 1 hour"
  10. ExpiresByType application/rss+xml "access plus 1 hour"
  11. ExpiresByType application/json "access plus 0 seconds"
  12. ExpiresByType application/ld+json "access plus 0 seconds"
  13. ExpiresByType application/schema+json "access plus 0 seconds"
  14. ExpiresByType application/vnd.geo+json "access plus 0 seconds"
  15. ExpiresByType application/xml "access plus 0 seconds"
  16. ExpiresByType text/xml "access plus 0 seconds"
  17. # Favicon (cannot be renamed!) and cursor images
  18. ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
  19. ExpiresByType image/x-icon "access plus 1 week"
  20. # HTML
  21. ExpiresByType text/html "access plus 0 seconds"
  22. # JavaScript
  23. ExpiresByType application/javascript "access plus 1 year"
  24. ExpiresByType application/x-javascript "access plus 1 year"
  25. ExpiresByType text/javascript "access plus 1 year"
  26. # Manifest files
  27. ExpiresByType application/manifest+json "access plus 1 week"
  28. ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
  29. ExpiresByType text/cache-manifest "access plus 0 seconds"
  30. # Media files
  31. ExpiresByType audio/ogg "access plus 1 month"
  32. ExpiresByType image/bmp "access plus 1 month"
  33. ExpiresByType image/gif "access plus 1 month"
  34. ExpiresByType image/jpeg "access plus 1 month"
  35. ExpiresByType image/png "access plus 1 month"
  36. ExpiresByType image/svg+xml "access plus 1 month"
  37. ExpiresByType image/webp "access plus 1 month"
  38. ExpiresByType video/mp4 "access plus 1 month"
  39. ExpiresByType video/ogg "access plus 1 month"
  40. ExpiresByType video/webm "access plus 1 month"
  41. # Web fonts
  42. # Embedded OpenType (EOT)
  43. ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  44. ExpiresByType font/eot "access plus 1 month"
  45. # OpenType
  46. ExpiresByType font/opentype "access plus 1 month"
  47. # TrueType
  48. ExpiresByType application/x-font-ttf "access plus 1 month"
  49. # Web Open Font Format (WOFF) 1.0
  50. ExpiresByType application/font-woff "access plus 1 month"
  51. ExpiresByType application/x-font-woff "access plus 1 month"
  52. ExpiresByType font/woff "access plus 1 month"
  53. # Web Open Font Format (WOFF) 2.0
  54. ExpiresByType application/font-woff2 "access plus 1 month"
  55. # Other
  56. ExpiresByType text/x-cross-domain-policy "access plus 1 week"
  57. </IfModule>
  58. # End Browser Caching
RAW Paste Data