Created
March 26, 2018 21:24
-
-
Save joshghent/fcca761d006ae34a1a2aaa0406a9e0f1 to your computer and use it in GitHub Desktop.
Cache Control Headers for Apache
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
# Cache Images for 1 Year | |
<filesMatch ".(jpg|jpeg|png|gif|ico)$"> | |
Header set Cache-Control "max-age=31536000, public" | |
</filesMatch> | |
# But Cache JS and CSS for a month! | |
<filesMatch ".(css|js)$"> | |
Header set Cache-Control "max-age=2628000, public" | |
</filesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment