Skip to content

Instantly share code, notes, and snippets.

@joshghent
Created March 26, 2018 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshghent/fcca761d006ae34a1a2aaa0406a9e0f1 to your computer and use it in GitHub Desktop.
Save joshghent/fcca761d006ae34a1a2aaa0406a9e0f1 to your computer and use it in GitHub Desktop.
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