Serve static assets with an efficient cache policy

Returning visitors are downloading files they already have. Your server is not telling browsers how long they may keep them.

What this warning means

Returning visitors are downloading files they already have. Your server is not telling browsers how long they may keep them.

Why it appeared on your page

Missing or very short `Cache-Control` headers. Sometimes deliberate, because asset filenames change on every deploy and long caching would serve stale files.

Does it actually matter?

It changes nothing for a first-time visitor, so it will not improve the metric a new visitor experiences — and Lighthouse measures a first visit. Worth fixing for returning visitors and for your own bandwidth, but do not expect your score to move much.

How to fix it

  1. Give fingerprinted assets — files whose name changes when their content does — a long lifetime, up to a year, with `immutable`.
  2. Keep HTML short-lived or revalidated, so content updates are seen.
  3. Introduce content hashing in your build if you do not have it; it is what makes long caching safe.
  4. Remember the three layers are different: browser cache, CDN edge cache, and server-side application cache.

On your platform

Hosted platforms set these headers for you and you cannot change them, so the warning may be unactionable. On self-hosted sites, configure it in Nginx or Apache.

How to check you fixed it

Reload with the cache enabled and confirm requests are served from disk or memory cache. Check the `Cache-Control` header on a static asset.