Pagespeed Insights Cache TTL


Hi all! This isn’t a crucial issue, but I’m hoping someone might have had experience with it or may even have found a workaround. On my clients’ sites I have .htaccess set to cache images for 90 days or more. (Some clients want them cached for up to 1 year.) However, on pages where I’m using BB Pagespeed Insights keeps telling me that the images used on that page have no TTL (Time To Live) set. Any idea why this might be happening/any way to make sure images on BB pages are following the same caching rules as the rest of the site?


without a link to the site and the code you added to htaccess you’ll only get speculative or stupid answers.


Okay. The client site that prompted me to check on it is The code I’ve used in the .htaccess file is:

ExpiresByType image/bmp "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/tiff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"

To be clear, this is working fine for images on non-BB pages, but for some reason, the images on the BB pages are being cited by Pagespeed Insights as having no cache TTL.


what page? what images?


Ah I see.

Well you are not using apache, so whatever you put in .htaccess will be ignored as you are using nginx.

Plesk probably has somewhere you can add expires to be added to the nginx config file. Your host will be able to help you.