VIP mrak7575 349 Posted March 20, 2017 VIP Report Share Posted March 20, 2017 <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5) ExpiresByType text/cache-manifest "access plus 0 seconds" # html ExpiresByType text/html "access plus 0 seconds" # XML ExpiresByType text/xml "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" # RSS ExpiresByType application/rss+xml "access plus 1 hour" # Favicon ExpiresByType image/x-icon "access plus 1 week" # Картинки ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" # HTC файлы (например css3pie) ExpiresByType text/x-component "access plus 1 month" # Нестандартные шрифты сайта ExpiresByType application/x-font-ttf "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType application/x-font-woff "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" # CSS и javascript ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" </IfModule> # Cache-Control браузера <ifModule mod_headers.c> # 30 дней <filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> # 30 дней <filesMatch "\.(css|js)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> # 2 дня <filesMatch "\.(xml|txt)$"> Header set Cache-Control "max-age=172800, public, must-revalidate" </filesMatch> # 1 день <filesMatch "\.(html|htm|php)$"> Header set Cache-Control "max-age=172800, private, must-revalidate" </filesMatch> </ifModule> <IfModule mod_setenvif.c> #Эта конструкция для говнобраузера #Запрет отдачи HTTP-заголовков Vary BrowserMatch "MSIE" force-no-vary BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary </IfModule> всем привет подскажите что за код ? нашел его в .htaccess , он отличается от сохраненной копии на моём компе , а на хостинге с этим кодом (я просто не помню чтоб я его добавлял в файл .htaccess Link to post Share on other sites
Модератор ApxuBapuyc 654 Posted March 20, 2017 Модератор Report Share Posted March 20, 2017 Это безобидный код. Кэширование. Link to post Share on other sites
VIP mrak7575 349 Posted March 20, 2017 Author VIP Report Share Posted March 20, 2017 ок спасибо тогда можно закрыть тему Link to post Share on other sites
Recommended Posts