WebPagetest Forums
Different result in caching test for the same kind of images - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Different result in caching test for the same kind of images (/showthread.php?tid=15897)



Different result in caching test for the same kind of images - patrmich - 09-18-2019 06:02 PM

Hello,

When I check my website on webpagetest.org, I get the following results :

Leverage browser caching of static assets: 37/100 :
- FAILED - (No max-age or expires) - for some images in png or jpg
- WARNING - (6.8 days) - for some other images in png or jpg

In my htaccess file are the here below lines :

Code:
# BEGIN Expire headers

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 week"
    ExpiresByType image/jpg "access plus 1 week"
    ExpiresByType image/png "access plus 1 week"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-javascript "access plus 1 week"
    ExpiresByType image/x-icon "access plus 1 year"
</IfModule>


# TN - BEGIN Cache-Control Headers

<ifModule mod_headers.c>

# Remote ETag from headers
Header unset ETag

# Disable ETag for files
FileETag None

<filesMatch "\.(ico|jpeg|jpg|png|gif|swf|pdf|svg)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# TN - END Cache-Control Headers

Would you know why, for some images I get the "FAILED" message and for some other I get the "WARNING" message ?

Is there anything wrong in the htaccess file ?

I thank you in advance for your any reply.

Patrick