Time-based
- How it triggers
revalidateinterval; the next request after it expires starts regeneration- Use it when
- Content changes on a rough schedule
Incremental Static Regeneration serves cached static pages and rebuilds them in the background. See how revalidation works in Next.js and on Vercel, with limits.
Incremental Static Regeneration (ISR) lets you update static pages after you have built the site, without rebuilding all of it. Visitors get a cached page right away and the framework regenerates it in the background, on a time interval or when you trigger it. Vercel describes it as a stale-while-revalidate caching strategy.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
next build times.It sits between static site generation, where every page is fixed at build time, and server-side rendering, where each request renders the page. Vercel says to use ISR when content updates on a known schedule, from minutes to hours, rather than in real time.
revalidate = 60, the cache is invalidated on a request, at most once every 60 seconds. The docs describe the sequence:// Next.js will invalidate the cache when a
// request comes in, at most once every 60 seconds.
export const revalidate = 60A visitor never waits for regeneration. The visitor who triggers it gets the stale page.
Pages returned by generateStaticParams are prerendered and cached.
Requests get the cached page.
The next request still returns the cached, now stale, page. The cache is invalidated and a new version starts generating in the background.
Once the new version generates successfully, the next request returns it and caches it.
revalidate interval; the next request after it expires starts regenerationrevalidatePath or revalidateTag, for example from a Server Action after adding a postThe Next.js docs recommend a high revalidation time, for instance 1 hour instead of 1 second. For more precision they point to on-demand revalidation, and for real-time data to switching to dynamic rendering. In the App Router, on-demand revalidation invalidates the entry and regeneration happens on the next request.
x-nextjs-cache response header shows HIT, STALE, MISS or REVALIDATED, which helps when you test.5 questions people ask next, answered from the sources on this page.
It is a way to update static pages after build time without rebuilding the whole site. The cached page is served, and a fresh version is generated in the background.
You set a revalidation time. After it passes, the next request still gets the stale cached page while Next.js regenerates a new one. Once that succeeds, later requests get the updated page.
SSR renders the page on each request. ISR serves a cached prerendered page and regenerates it in the background on an interval or when you trigger it.
Vercel says its CDN manages ISR caching for frameworks such as Next.js, SvelteKit, Nuxt and Astro.
In Next.js the last successfully generated data continues to be served and revalidation is retried on a later request. On Vercel, stale content is kept with a 30-second TTL before the retry.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.