-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.htaccess
31 lines (28 loc) · 1.2 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
AddType text/cache-manifest .manifest
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript text/cache-manifest
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# css and javascript
ExpiresByType text/css "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
</IfModule>
<IfModule mod_headers.c>
<filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|cur)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\.(css|js|htm|html)$">
Header set Cache-Control "max-age=604800, no-cache"
</filesMatch>
<filesMatch "\.(manifest)$">
Header set Cache-Control "max-age=0, no-cache"
</filesMatch>
<filesMatch "\.(htm|html|css|js)$">
AddDefaultCharset UTF-8
DefaultLanguage en-US
</filesMatch>
</IfModule>