Last active
December 15, 2015 02:59
-
-
Save scott-joe/5190745 to your computer and use it in GitHub Desktop.
basic asset caching for development.http://perishablepress.com/stupid-htaccess-tricks/
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
# implement minimal caching during site development | |
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|htm|txt)$"> | |
Header set Cache-Control "max-age=5" | |
</FilesMatch> | |
# explicitly disable caching for scripts and other dynamic files | |
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> | |
Header unset Cache-Control | |
</FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment