-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
357885d
commit 2d1b89a
Showing
1 changed file
with
35 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
## EXPIRES CACHING ## | ||
<IfModule mod_expires.c> | ||
ExpiresActive On | ||
ExpiresByType image/jpg "access 1 year" | ||
ExpiresByType image/jpeg "access 1 year" | ||
ExpiresByType image/gif "access 1 year" | ||
ExpiresByType image/png "access 1 year" | ||
ExpiresByType text/css "access 1 month" | ||
ExpiresByType text/html "access 1 month" | ||
ExpiresByType application/pdf "access 1 month" | ||
ExpiresByType text/x-javascript "access 1 month" | ||
ExpiresByType application/x-shockwave-flash "access 1 month" | ||
ExpiresByType image/x-icon "access 1 year" | ||
ExpiresDefault "access 1 month" | ||
</IfModule> | ||
## EXPIRES CACHING ## | ||
<IfModule mod_headers.c> | ||
Header set Connection keep-alive | ||
|
||
# Cache-control headers | ||
# 2 HOURS | ||
#<filesMatch "*"> | ||
Header set Cache-Control "max-age=7200, must-revalidate" | ||
#</filesMatch> | ||
|
||
# 480 weeks - 290304000 | ||
# 2 WEEKS | ||
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|swf)$"> | ||
Header set Cache-Control "max-age=1209600, public" | ||
</filesMatch> | ||
|
||
# 1 DAY | ||
<filesMatch "\.(css)$"> | ||
Header set Cache-Control "max-age=86400, public, must-revalidate" | ||
#Header set Cache-Control "max-age=0, public, must-revalidate" | ||
</filesMatch> | ||
|
||
# 2 DAYS | ||
<filesMatch "\.(xml|txt)$"> | ||
Header set Cache-Control "max-age=172800, public, must-revalidate" | ||
</filesMatch> | ||
|
||
# 2 HOURS | ||
<filesMatch "\.(html|htm)$"> | ||
Header set Cache-Control "max-age=7200, must-revalidate" | ||
</filesMatch> | ||
|
||
<FilesMatch "\.(gif|jpg|png|ico|css|js|pdf|txt)$"> | ||
Header append Cache-Control "public" | ||
</FilesMatch> | ||
</IfModule> |