Skip to content
You are currently viewing documentation for the canary channel of Next.js

swrDelta

You can specify a custom stale-while-revalidate period for CDNs to consume in the Cache-Control header for ISR enabled pages.

Open next.config.js and add the swrDelta config:

next.config.js
module.exports = {
  // one year in seconds
  swrDelta: 31536000,
}

Now instead of the default of 1 year stale-while-revalidate period being provided in the Cache-Control header, the custom period will be included.