PDA

View Full Version : The expiration was not determined


Stratis
06-08-2017, 12:59 PM
This message I get in pagespeed - insights.
"not specified expiration"

mysite/customavatars/avatarxxx.gif
mysite/customavatars/thumbs/avatarxxx.gif
mysite/images/forurmicons/xxx.png
and so on.

What code I must put and where to fix these errors.


Thanks in advance :)

Seven Skins
06-08-2017, 08:10 PM
You can do this via .htacces file ... see this (https://gtmetrix.com/add-expires-headers.html)

Stratis
06-09-2017, 05:21 PM
For years i have in my .htacces file this:

<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
</IfModule>

It seems that does not take effect. Do I must change the path?
Something like this? (see first post for others)

ExpiresByType customavatars/avatarxxx.gif "access plus 7 days"

Thank you for answering, I appreciate it

Stingray27
06-09-2017, 05:33 PM
They are not errors, just informational, you dont need to have expiry dates on them.