WebSite X5Help Center

 
Nektarios K.
Nektarios K.
User

Add Expires headers  en

Autor: Nektarios K.
Visitado 657, Followers 1, Compartido 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

Publicado en
3 RESPUESTAS
Aleksej H.
Aleksej H.
Moderator

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>

Leer más
Publicado en de Aleksej H.
Nektarios K.
Nektarios K.
User
Autor

Dear Aleksej H.

Not working still Pingdom  show me Add Expires headers

Leer más
Publicado en de Nektarios K.
Aleksej H.
Aleksej H.
Moderator

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

Leer más
Publicado en de Aleksej H.