Created
June 2, 2017 21:45
-
-
Save thesaurabhk/81f5d01b1f47eaefd6bfe7dfb935964f to your computer and use it in GitHub Desktop.
Add Cache-Control Headers https://technumero.com/increase-page-speed-using-htaccess-wordpress/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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