Commit ccc9a8a31fc24a87f2dbb270a0d87ad895e4f847
1 parent
5f655d5a
image size
Showing
1 changed file
with
44 additions
and
0 deletions
Show diff stats
.htaccess
@@ -77,4 +77,48 @@ AddDefaultCharset utf-8 | @@ -77,4 +77,48 @@ AddDefaultCharset utf-8 | ||
77 | <IfModule mod_php5.c> | 77 | <IfModule mod_php5.c> |
78 | php_value upload_max_filesize 20M | 78 | php_value upload_max_filesize 20M |
79 | php_value post_max_size 30M | 79 | php_value post_max_size 30M |
80 | +</IfModule> | ||
81 | + | ||
82 | + | ||
83 | +# кеширование в браузере на стороне пользователя | ||
84 | +<IfModule mod_expires.c> | ||
85 | +ExpiresActive On | ||
86 | +ExpiresDefault "access 7 days" | ||
87 | +ExpiresByType application/javascript "access plus 1 year" | ||
88 | +ExpiresByType text/javascript "access plus 1 year" | ||
89 | +ExpiresByType text/css "access plus 1 year" | ||
90 | +ExpiresByType text/html "access plus 7 day" | ||
91 | +ExpiresByType text/x-javascript "access 1 year" | ||
92 | +ExpiresByType image/gif "access plus 1 year" | ||
93 | +ExpiresByType image/jpeg "access plus 1 year" | ||
94 | +ExpiresByType image/png "access plus 1 year" | ||
95 | +ExpiresByType image/jpg "access plus 1 year" | ||
96 | +ExpiresByType image/x-icon "access 1 year" | ||
97 | +ExpiresByType application/x-shockwave-flash "access 1 year" | ||
98 | +</IfModule> | ||
99 | + | ||
100 | +# Cache-Control | ||
101 | +<ifModule mod_headers.c> | ||
102 | +# 30 дней | ||
103 | +<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | ||
104 | +Header set Cache-Control "max-age=2592000, public" | ||
105 | +</filesMatch> | ||
106 | +# 30 дней | ||
107 | +<filesMatch "\.(css|js)$"> | ||
108 | +Header set Cache-Control "max-age=2592000, public" | ||
109 | +</filesMatch> | ||
110 | +# 2 дня | ||
111 | +<filesMatch "\.(xml|txt)$"> | ||
112 | +Header set Cache-Control "max-age=172800, public, must-revalidate" | ||
113 | +</filesMatch> | ||
114 | +# 1 день | ||
115 | +<filesMatch "\.(html|htm|php)$"> | ||
116 | +Header set Cache-Control "max-age=172800, private, must-revalidate" | ||
117 | +</filesMatch> | ||
118 | +</ifModule> | ||
119 | + | ||
120 | +#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE | ||
121 | +<IfModule mod_setenvif.c> | ||
122 | +BrowserMatch "MSIE" force-no-vary | ||
123 | +BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary | ||
80 | </IfModule> | 124 | </IfModule> |
81 | \ No newline at end of file | 125 | \ No newline at end of file |