WebPagetest Forums

Full Version: Different result in caching test for the same kind of images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Reference URL's