-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify .htaccess with maximum cache for everything but html and xml
- Loading branch information
Showing
2 changed files
with
45 additions
and
40 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 +1,45 @@ | ||
ErrorDocument 404 /404.html | ||
ErrorDocument 404 /404.html | ||
|
||
<IfModule mod_expires.c> | ||
|
||
ExpiresActive on | ||
|
||
ExpiresDefault "access plus 1 month" | ||
|
||
# JavaScript | ||
|
||
ExpiresByType application/javascript "access plus 1 year" | ||
ExpiresByType application/x-javascript "access plus 1 year" | ||
ExpiresByType text/javascript "access plus 1 year" | ||
|
||
ExpiresByType text/html "modification" | ||
|
||
</IfModule> | ||
|
||
<IfModule mod_headers.c> | ||
<filesmatch "\.(css|jpg|jpeg|js|png)$"> | ||
Header set Cache-Control "max-age=31536000, public" | ||
</filesmatch> | ||
<filesmatch "\.(html|xml)$"> | ||
Header set Cache-Control "no-store, max-age=0" | ||
</filesmatch> | ||
</IfModule> | ||
|
||
|
||
# ---------------------------------------------------------------------- | ||
# ETag removal | ||
# ---------------------------------------------------------------------- | ||
|
||
# FileETag None is not enough for every server. | ||
<IfModule mod_headers.c> | ||
Header unset ETag | ||
</IfModule> | ||
|
||
# Since we're sending far-future expires, we don't need ETags for | ||
# static content. | ||
# developer.yahoo.com/performance/rules.html#etags | ||
FileETag None | ||
|
||
<IfModule mod_headers.c> | ||
Header unset Server | ||
</IfModule> |
This file was deleted.
Oops, something went wrong.