Last active
June 13, 2019 11:43
-
-
Save nico-martin/db94f7356eb6438b32a146ae225b118f to your computer and use it in GitHub Desktop.
Cache-Control headers
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> | |
# One year for image and video files | |
<filesMatch ".(flv|gif|ico|jpg|jpeg|mp4|mpeg|png|svg|swf|webp)$"> | |
Header set Cache-Control "max-age=31536000, public" | |
</filesMatch> | |
# One month for JavaScript and PDF files | |
<filesMatch ".(js|pdf)$"> | |
Header set Cache-Control "max-age=2592000, public" | |
</filesMatch> | |
# One year for CSS files | |
<filesMatch ".(css)$"> | |
Header set Cache-Control "max-age=31536000, public" | |
</filesMatch> | |
</ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment