IS
All notes
#performance#nextjs#caching

Next.js hashes its static assets — cache them forever

Files in /_next/static already carry a content hash in their name. So they can be cached immutably for a year: if the file changes, its name changes too, and the old cache never goes stale in the wrong way.

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

For an audience with high RTT (Central Asia) this is tangible: on repeat visits the browser doesn't hit the server for JS/CSS at all. I tagged my own images and fonts with the same header via headers() in next.config.