Created
January 7, 2021 11:12
-
-
Save bystefu/f6646473b87bce22f0d7eb271b21907a to your computer and use it in GitHub Desktop.
Htaccess Disable Cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DISABLE CACHING | |
<IfModule mod_headers.c> | |
Header set Cache-Control "no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Expires 0 | |
</IfModule> | |
<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$"> | |
<IfModule mod_expires.c> | |
ExpiresActive Off | |
</IfModule> | |
<IfModule mod_headers.c> | |
FileETag None | |
Header unset ETag | |
Header unset Pragma | |
Header unset Cache-Control | |
Header unset Last-Modified | |
Header set Pragma "no-cache" | |
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT" | |
</IfModule> | |
</FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment