WebSite X5Help Center

 
Nektarios K.
Nektarios K.
User

Add Expires headers  en

Author: Nektarios K.
Visited 82, Followers 1, Shared 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

Posted on the
3 ANSWERS
Aleksej H.
Aleksej H.
Moderator
Best User of the month RU

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>

Read more
Posted on the from Aleksej H.
Nektarios K.
Nektarios K.
User
Author

Dear Aleksej H.

Not working still Pingdom  show me Add Expires headers

Read more
Posted on the from Nektarios K.
Aleksej H.
Aleksej H.
Moderator
Best User of the month RU

Ask this question to the technical support service of your hosting.

Read more
Posted on the from Aleksej H.