Skip to content

Should the revalidate route segment config option update the Cache-Control header? #82015

Discussion options

You must be logged in to vote

Hi @pauledwards241,

Great question! Here’s how Next.js handles the revalidate route segment config and Cache-Control headers currently:

Setting export const revalidate = 600 does not directly update the Cache-Control header to max-age=600.

Instead, Next.js manages revalidation internally and sets cache headers based on its own logic and hosting platform (like Vercel).

For dynamic = 'force-static', Next.js adds Cache-Control: public, max-age=0, must-revalidate to ensure the content is fresh but still cached by browsers/CDNs.

The actual revalidation timing for ISR is controlled server-side, often by a separate header or platform config, not purely by the Cache-Control max-age.

On Vercel, IS…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pauledwards241
Comment options

Answer selected by pauledwards241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants