Skip to content

Instantly share code, notes, and snippets.

@thesaurabhk
Created June 2, 2017 21:45
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 thesaurabhk/81f5d01b1f47eaefd6bfe7dfb935964f to your computer and use it in GitHub Desktop.
Save thesaurabhk/81f5d01b1f47eaefd6bfe7dfb935964f to your computer and use it in GitHub Desktop.
#
# Paste the following code into your .Htaccess file
#
# TN - BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# TN - END Cache-Control Headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment