Static sites are now cached by browsers and crawlers
Sites served from their own domain were sent with no-cache on every file, so each visit re-downloaded everything. Build assets are now cached for a year, and pages revalidate in a single cheap round trip.
Until now every file on a public site went out with Cache-Control: no-cache.
Browsers and crawlers kept nothing, so a returning visitor downloaded the same
stylesheet, script and images on every page view — including build assets whose
filenames change whenever their contents do, and which can therefore never go
stale.
Each file now gets a policy that suits it:
| File | Policy |
|---|---|
Hashed build assets — _astro/, _next/static/, _nuxt/, _app/immutable/, _assets/ |
cached for a year |
| HTML pages | revalidated on every visit, so a new deploy shows immediately |
| Everything else | cached for an hour, served stale for a day while refreshing |
Files also carry an ETag. When a browser revalidates a page that hasn’t
changed, it gets a 304 Not Modified with no body rather than the whole page
again.
This applies to public (Level 0) sites. Encrypted workloads are unchanged. There is nothing to configure — it takes effect on your next page view.