Jump to content

подскажите что за код

Recommended Posts

<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"


# Cache-Control браузера 
<ifModule mod_headers.c>
	# 30 дней
	<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
	Header set Cache-Control "max-age=2592000, public"
	# 30 дней
	<filesMatch "\.(css|js)$">
	Header set Cache-Control "max-age=2592000, public"
	# 2 дня
	<filesMatch "\.(xml|txt)$">
	Header set Cache-Control "max-age=172800, public, must-revalidate"
	# 1 день
	<filesMatch "\.(html|htm|php)$">
	Header set Cache-Control "max-age=172800, private, must-revalidate"

<IfModule mod_setenvif.c>
	#Эта конструкция для говнобраузера
	#Запрет отдачи HTTP-заголовков Vary
	BrowserMatch "MSIE" force-no-vary
	BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary

всем привет подскажите что за код ? нашел его в  .htaccess  , он отличается от сохраненной копии на моём компе , а на хостинге с этим кодом (я просто не помню чтоб я его добавлял в файл .htaccess 

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...