Skip to content

Performance

How to set Cache-Control on static assets

With no Cache-Control, ETag or Last-Modified, browsers apply a heuristic and CDNs usually decline to cache at all, so the asset is fetched from your origin far more often than it needs to be. One header turns a repeat request into a local read.

What 13x checks

This is rule performance.cache-headers in the public registry: Static assets are cacheable. It runs on every audit, against the pages we actually fetched, and its result is derived from the response rather than estimated.

Surface
Performance
Score weight
6 of the readiness score
Scope
Runs on every audited page
Applies
Only where the market or the page shape makes it relevant

Registry version 2026-07-30. Every rule is published, and the audit is deterministic — the same page produces the same finding every time.

The fix

The same text the audit hands you when this check fails on your own site.

Serve static assets with a cache policy that matches how they are named.

Content-hashed filenames (main.4f2a91c.css) can be cached permanently, because a change to the file changes its URL:

Configuration
Cache-Control: public, max-age=31536000, immutable

Stable filenames (styles.css) cannot — the URL has to keep working after the next deploy. Cache briefly and revalidate:

Configuration
Cache-Control: public, max-age=0, must-revalidate
ETag: "a1b2c3"

immutable is the part people leave off. Without it a browser still sends a revalidation request on every reload — a round trip whose only possible answer is 304 Not Modified.

Never put no-store on a static asset. It disables caching everywhere, including the CDN, so every visitor fetches your CSS from the origin on every navigation. That is survivable on a normal day and is precisely what falls over during a launch spike.

Framework-specific versions

Where the change differs enough to be worth writing out separately.

Does your site have this problem?

13x checks this and 112 others against your live URL in about 30 seconds. No account, and every finding comes with the fix for your framework.

No signup. Results in 30 seconds.

More performance checks