Skip to content
Nazmul Nikhil
Menu

Use Efficient Cache Lifetimes in PageSpeed Insights: Set Long Browser Caching

PageSpeed flags files that browsers must re-download too often. Here's how to set long Cache-Control lifetimes on cPanel, Nginx, CDNs and platforms.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Use Efficient Cache Lifetimes in PageSpeed Insights: Set Long Browser Caching
Photo: Kashish Lamba on Unsplash

In short

This insight lists static files (images, fonts, CSS, JS) with short or missing cache lifetimes, showing each file's "Cache TTL." Longer lifetimes let repeat visitors skip downloads. It mainly helps return visits, not the first-load score. Set long Cache-Control lifetimes on versioned static files. You can't change cache headers on third-party files.

This was called "Serve static assets with an efficient cache policy."

Replaced: uses-long-cache-ttl.

File type Header
Versioned CSS, JS, fonts, images (file name changes on update) Cache-Control: public, max-age=31536000, immutable
Images that may be replaced at the same URL A shorter lifetime, such as 30 days
HTML pages Short or no-cache, so updates show

Apache (.htaccess):

<IfModule mod_headers.c>
<FilesMatch "\.(css|js|woff2|webp|avif|jpg|png|svg)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</IfModule>

Only use one year plus immutable if file names change when content changes; otherwise visitors may see old files.

WordPress: caching plugins and hosts usually set this; check the plugin's browser caching option. Cloudflare: set Browser Cache TTL. Shopify, Webflow and Wix: managed by the platform; flagged files are usually third-party scripts.

Common mistakes

  • Trying to fix third-party TTLs (analytics, chat widgets). You can't; ignore or remove them.

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsUse efficient cache lifetimesServe static assets with an efficient cache policyCache-control max-age
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Core Web Vitals

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com