Default s-maxage=31536000 for static pages may cause stale content issues in CDN #80680
Unanswered
ale-grosselle
asked this question in
Help
Replies: 1 comment 1 reply
-
I'll try to investigate what's going on here |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi team 👋,
I've noticed that Next.js sets the following header for pages generated at build time:
Cache-Control: s-maxage=31536000
While I understand the intention — treating these pages as fully static — this can lead to serious issues in production environments when served behind a CDN (such as Akamai, Cloudflare, etc.). Specifically:
s-maxage
), making it easy to overlook the issue.I’m not sure I fully understand this choice — what am I missing or misunderstanding here?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions