Created
May 27, 2014 20:36
-
-
Save skreuzer/7c388b939c5f4b5a8d5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Cache images for one month | |
<FilesMatch ".(gif|jpg|jpeg|png|ico)$"> | |
Header set Cache-Control "max-age=2592000" | |
</FilesMatch> | |
# Cache text, CSS, and javascript files for one week | |
<FilesMatch ".(js|css|txt)$"> | |
Header set Cache-Control "max-age=604800" | |
</FilesMatch> | |
# Cache HTML files for one day | |
<FilesMatch ".(html|htm)$"> | |
Header set Cache-Control "max-age=43200" | |
</FilesMatch> | |
# Explicitly disable caching for scripts and other dynamic files | |
<FilesMatch "\.(pl|php|cgi)$"> | |
Header unset Cache-Control | |
</FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment