Last active
August 29, 2015 14:17
-
-
Save ostark/074d8e122499b61dd04b to your computer and use it in GitHub Desktop.
Cache-Control headers for static assets
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
<ifModule mod_headers.c> | |
# Expires after 1 month | |
<filesMatch ".(gif|png|jpg|jpeg|ico|pdf|svg|js)$"> | |
Header set Cache-Control "max-age=2592000" | |
</filesMatch> | |
# Expires after 1 day | |
<filesMatch ".(css)$"> | |
Header set Cache-Control "max-age=86400" | |
</filesMatch> | |
</ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment