Commit 87a3d56e74117e570d9341888c36495f1ac5825b
1 parent
3395c04b
image size
Showing
1 changed file
with
34 additions
and
34 deletions
Show diff stats
.htaccess
| @@ -81,21 +81,21 @@ AddDefaultCharset utf-8 | @@ -81,21 +81,21 @@ AddDefaultCharset utf-8 | ||
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | # кеширование в браузере на стороне пользователя | 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> | 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 | 99 | ||
| 100 | <IfModule mod_deflate.c> | 100 | <IfModule mod_deflate.c> |
| 101 | AddOutputFilterByType DEFLATE text/plain | 101 | AddOutputFilterByType DEFLATE text/plain |
| @@ -117,25 +117,25 @@ RewriteCond %{HTTP:Accept-encoding} gzip | @@ -117,25 +117,25 @@ RewriteCond %{HTTP:Accept-encoding} gzip | ||
| 117 | RewriteCond %{REQUEST_FILENAME}.gz -f | 117 | RewriteCond %{REQUEST_FILENAME}.gz -f |
| 118 | RewriteRule ^(.*)$ $1.gz [QSA,L] | 118 | RewriteRule ^(.*)$ $1.gz [QSA,L] |
| 119 | </IfModule> | 119 | </IfModule> |
| 120 | -## Cache-Control | ||
| 121 | -#<ifModule mod_headers.c> | ||
| 122 | -## 30 дней | ||
| 123 | -#<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | ||
| 124 | -#Header set Cache-Control "max-age=2592000, public" | ||
| 125 | -#</filesMatch> | ||
| 126 | -## 30 дней | ||
| 127 | -#<filesMatch "\.(css|js)$"> | ||
| 128 | -#Header set Cache-Control "max-age=2592000, public" | ||
| 129 | -#</filesMatch> | ||
| 130 | -## 2 дня | ||
| 131 | -#<filesMatch "\.(xml|txt)$"> | ||
| 132 | -#Header set Cache-Control "max-age=172800, public, must-revalidate" | ||
| 133 | -#</filesMatch> | ||
| 134 | -## 1 день | ||
| 135 | -#<filesMatch "\.(html|htm|php)$"> | ||
| 136 | -#Header set Cache-Control "max-age=172800, private, must-revalidate" | ||
| 137 | -#</filesMatch> | ||
| 138 | -#</ifModule> | 120 | +# Cache-Control |
| 121 | +<ifModule mod_headers.c> | ||
| 122 | +# 30 дней | ||
| 123 | +<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | ||
| 124 | +Header set Cache-Control "max-age=2592000, public" | ||
| 125 | +</filesMatch> | ||
| 126 | +# 30 дней | ||
| 127 | +<filesMatch "\.(css|js)$"> | ||
| 128 | +Header set Cache-Control "max-age=2592000, public" | ||
| 129 | +</filesMatch> | ||
| 130 | +# 2 дня | ||
| 131 | +<filesMatch "\.(xml|txt)$"> | ||
| 132 | +Header set Cache-Control "max-age=172800, public, must-revalidate" | ||
| 133 | +</filesMatch> | ||
| 134 | +# 1 день | ||
| 135 | +<filesMatch "\.(html|htm|php)$"> | ||
| 136 | +Header set Cache-Control "max-age=172800, private, must-revalidate" | ||
| 137 | +</filesMatch> | ||
| 138 | +</ifModule> | ||
| 139 | 139 | ||
| 140 | #Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE | 140 | #Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE |
| 141 | <IfModule mod_setenvif.c> | 141 | <IfModule mod_setenvif.c> |