ISR (Incremental Static Regeneration)
ISR is the Next.js / Jamstack pattern where pages are statically generated but periodically (or on-demand) re-rendered + cached — combines SSG speed with SSR freshness without full rebuild.
In more detail
What it means
Pure SSG (static site generation) is fastest but stale — change a CMS entry, the site stays stale until next build. Pure SSR (server rendering) is fresh but slow — every request hits the server. ISR splits the difference: pages are static-rendered to a CDN, but re-render on a schedule (revalidate every N seconds) or on-demand (webhook from CMS → revalidate this URL). Result: stale-while-revalidate UX — users get fast cached HTML, the cache refreshes in background. Implementations: Next.js (`revalidate: 60`, `revalidatePath()`), Astro (incremental builds + on-demand rendering), Gatsby Cloud (incremental builds). Production wins: SEO-friendly + fast + can update without full deploy. Production losses: cache invalidation can lag, complex routing edge cases.
Part 1 of 2
When to use it, and when not
Use it for
- Content-heavy sites with CMS-backed updates.
- E-commerce listings that don't need second-by-second freshness.
Part 2 of 2
Common mistakes
- Setting `revalidate` to seconds when minutes would do — wastes compute.
- Forgetting on-demand revalidation hooks — content updates lag behind CMS.
FAQ
Questions readers ask.
What is isr (incremental static regeneration)?
ISR is the Next.js / Jamstack pattern where pages are statically generated but periodically (or on-demand) re-rendered + cached — combines SSG speed with SSR freshness without full rebuild.
When should you use isr (incremental static regeneration)?
Content-heavy sites with CMS-backed updates. E-commerce listings that don't need second-by-second freshness.
What are the common mistakes with isr (incremental static regeneration)?
Setting `revalidate` to seconds when minutes would do — wastes compute. Forgetting on-demand revalidation hooks — content updates lag behind CMS.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/isr.md. Found a mistake? Tell us.