Skip to content

Instantly share code, notes, and snippets.

@joshghent joshghent/.htaccess
Created Mar 26, 2018

Embed
What would you like to do?
Cache Control Headers for Apache
# 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
You can’t perform that action at this time.