retesere20

Untitled

Aug 22nd, 2016
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##################################################################
  2. ################## CACHING with "Cache-control" #############
  3. ### Description: This block is not needed, if you use "EXPIRES" method for caching.
  4. # But if your hosting doesnt support "EXPIRES", OR you just want
  5. # to use some specific options (i.e. revalidate,no-cache...), then
  6. # instead of "EXPIRES" method, use this block:
  7. ##################################################################
  8. <ifModule mod_headers.c>
  9. #max age is calculated in seconds (1 month = 2592000 )
  10. <filesMatch "\.(css|jpg|jpeg|png|gif|js|ico|pdf|flv|swf)$">
  11. Header set Cache-Control "max-age=2592000, public"
  12. </filesMatch>
  13. <filesMatch "\.(xml|txt)$">
  14. Header set Cache-Control "max-age=216000, public, must-revalidate"
  15. </filesMatch>
  16. <filesMatch "sitemap\.xml$">
  17. Header set Cache-Control "max-age=500, private, no-cache"
  18. </filesMatch>
  19. <filesMatch "\.(x?html?|htm)$">
  20. Header set Cache-Control "max-age=216000, private, must-revalidate"
  21. </filesMatch>
  22. <filesMatch "\.(php)$">
  23. Header set Cache-Control "max-age=0, private, must-revalidate"
  24. </filesMatch>
  25. </ifModule>
RAW Paste Data