Skip to content

Instantly share code, notes, and snippets.

@ostark
Last active August 29, 2015 14:17
Show Gist options
  • Save ostark/074d8e122499b61dd04b to your computer and use it in GitHub Desktop.
Save ostark/074d8e122499b61dd04b to your computer and use it in GitHub Desktop.
Cache-Control headers for static assets
<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