Advertisement
Fany_VanDaal

Add Cache-Control Headers (Apache)

Apr 25th, 2019
157
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None
  1. # TN - BEGIN Cache-Control Headers
  2. <ifModule mod_headers.c>
  3. <filesMatch "\.(ico|jpeg|jpg|png|gif|swf|pdf|svg)$">
  4. Header set Cache-Control "public"
  5. </filesMatch>
  6. <filesMatch "\.(css)$">
  7. Header set Cache-Control "public"
  8. </filesMatch>
  9. <filesMatch "\.(js)$">
  10. Header set Cache-Control "private"
  11. </filesMatch>
  12. <filesMatch "\.(x?html?|php)$">
  13. Header set Cache-Control "private, must-revalidate"
  14. </filesMatch>
  15. </ifModule>
  16. # TN - END Cache-Control Headers
Advertisement
RAW Paste Data Copied
Advertisement