theitd

htaccess no-cache

Nov 13th, 2020
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. # DISABLE CACHING
  2. <IfModule mod_headers.c>
  3. Header set Cache-Control "no-cache, no-store, must-revalidate"
  4. Header set Pragma "no-cache"
  5. Header set Expires 0
  6. </IfModule>
  7.  
  8. <FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$">
  9. <IfModule mod_expires.c>
  10. ExpiresActive Off
  11. </IfModule>
  12. <IfModule mod_headers.c>
  13. FileETag None
  14. Header unset ETag
  15. Header unset Pragma
  16. Header unset Cache-Control
  17. Header unset Last-Modified
  18. Header set Pragma "no-cache"
  19. Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
  20. Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
  21. </IfModule>
  22. </FilesMatch>
Add Comment
Please, Sign In to add comment