Created
August 31, 2013 15:09
-
-
Save cloudchen/6398811 to your computer and use it in GitHub Desktop.
Disable static file cache for Apache -- Useful for debug environment
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
<FilesMatch ".(html|htm|js|css|less)$"> | |
FileETag None | |
<ifModule mod_headers.c> | |
Header unset ETag | |
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" | |
</ifModule> | |
</FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose that we have 2 virtual hosts in dev environment which are
localhost
andlocalhost2
.Only add this configuration to
localhost2
host rather general ones.Access
localhost2
for debugging when you don't want meet cache problem which is especially useful for developing withrequirejs
modules.