Skip to content

Instantly share code, notes, and snippets.

@hsquareweb
Last active April 29, 2017 07:58
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 hsquareweb/d0bf2eb5a58deab30d686353e0eab991 to your computer and use it in GitHub Desktop.
Save hsquareweb/d0bf2eb5a58deab30d686353e0eab991 to your computer and use it in GitHub Desktop.
Cache-Control - HTTP headers for static resources. Read more at https://varvy.com/pagespeed/cache-control.html
# Cache-Control - HTTP headers for static resources
<IfModule mod_headers.c>
# One year for image and video files
<filesMatch ".(jpg|jpeg|png|gif|ico|mp4|webm)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
# One month for css and js
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment