Skip to content

Rule · Performance

Hashed static assets are not cached long-term

perf/cache-headerswarnvoid perfupdated

Why it matters

Fingerprinted files never change, so anything short of a year-long immutable cache makes repeat visitors re-download them.

How to fix it

Serve content-hashed assets with Cache-Control: public, max-age=31536000, immutable. Keep HTML on no-cache or a short CDN s-maxage.

Example

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

void perf reports 25 rules in this category. Core Web Vitals and bytes: LCP, CLS, TBT, TTFB, JavaScript, CSS, fonts, images, caching and compression, measured as the median of several runs on a throttled mobile and a desktop profile.