26.2.14

Включаем GZIP сжатие css, js и html и увеличиваем срок жизни кэша браузера

Включаем GZIP сжатие css, js и html 

Добавляем строчки в .htaccess

 # compress text, html, javascript, css, xml:
 AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html
 AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css
 AddOutputFilterByType DEFLATE application/xml
 AddOutputFilterByType DEFLATE application/xhtml+xml
 AddOutputFilterByType DEFLATE application/rss+xml
 AddOutputFilterByType DEFLATE application/javascript
 AddOutputFilterByType DEFLATE application/x-javascript
 # Or, compress certain file types by extension:

 SetOutputFilter DEFLATE

Проверяем тут http://www.gidnetwork.com/tools/gzip-test.php

Увеличиваем срок жизни кэша браузера

Добавляем строчки в .htaccess



ExpiresActive On
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType text/css "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"

link

Комментариев нет:

Отправить комментарий