Performance
Cache-Control tells browsers and CDNs how long they may reuse a response instead of downloading it again.
Not sure whether your site has this problem? Check it in seconds.
Good caching makes repeat visits faster and reduces load on your server. Bad caching either re-downloads everything every time or serves visitors out-of-date pages.
Check the Cache-Control header on your CSS, JavaScript and image files in DevTools → Network.
Versioned/hashed assets
Cache-Control: public, max-age=31536000, immutableHTML pages
Cache-Control: no-cacheNginx
location ~* \.(?:css|js|woff2|png|jpg|jpeg|webp|svg)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
}Next.js sets long-lived immutable caching on its hashed static assets by default; you mostly need to think about your own files and API responses.
Guidance is general. Test header and DNS changes on a staging copy first, and check your hosting provider's documentation for platform-specific steps.