Quick Answer: For Next.js pages, use cache-control policies based on render mode: fully static pages and immutable build assets should be cached at the CDN and browser level with long TTLs, while SSR, personalized, or frequently changing routes should use `Cache-Control: no-store` or short `s-maxage` with `stale-while-revalidate`. For static assets like `/_next/static/*`, the recommended approach is `public, max-age=31536000, immutable` because filenames are content-hashed and safe to cache aggressively.
The optimal caching strategy in Next.js is to separate content by volatility. Static pages generated at build time and hashed assets can be cached aggressively to reduce origin load and improve TTFB, while dynamic pages that depend on cookies, auth state, query parameters, or real-time data should avoid browser caching or rely on short shared-cache directives with revalidation. In practice, this means long-lived cache headers for versioned assets and ISR-generated content, and conservative headers for SSR or user-specific responses. When deploying behind a CDN, combine `s-maxage` for edge caching with `stale-while-revalidate` to preserve performance without sacrificing freshness.