Skip to content

Instantly share code, notes, and snippets.

@scott-joe
Last active December 15, 2015 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scott-joe/5190745 to your computer and use it in GitHub Desktop.
Save scott-joe/5190745 to your computer and use it in GitHub Desktop.
basic asset caching for development.http://perishablepress.com/stupid-htaccess-tricks/
# 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