Add Expires headers
Автор: Nektarios K.
Просмотрено 943,
Подписчики 1,
Размещенный 0
Hi there
I use the following in htaccess
# BEGIN Cache-Control Headers
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=31536000, public"
<filesMatch "\.(css|js)$">
Header set Cache-Control "max-age=31536000, public"
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=31536000, public, must-revalidate"
# END Cache-Control Headers
My problem is still pingdom show me Add Expires headers....
Does any solution, please?
https://www.mieconsultancy.com
Regards,
Nek
Размещено
Hello. Try it. If it does not help, ask this question to the technical support service of your hosting.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# Webfonts
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 and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
Автор
Dear Aleksej H.
Not working still Pingdom show me Add Expires headers
Ask this question to the technical support service of your hosting.