Skip to content

Instantly share code, notes, and snippets.

@michaeldozark
Created January 24, 2014 17:35
Show Gist options
  • Save michaeldozark/8602147 to your computer and use it in GitHub Desktop.
Save michaeldozark/8602147 to your computer and use it in GitHub Desktop.
AddType image/x-icon .ico
<IfModule mod_headers.c>
# YEAR
<FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf)$">
Header set Cache-Control "max-age=29030400"
</FilesMatch>
# WEEK
<FilesMatch "\.(js|css|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
# 24 HOURS
<FilesMatch "\.(html|htm|txt|php)$">
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