Incremental Static Regeneration (ISR)
Popularized by Vercel / Next.js
js, that lets individual statically generated pages be regenerated in the background after deployment, without rebuilding the entire site.
Definition
Incremental Static Regeneration (ISR) is a rendering technique, popularized by Next.js, that lets individual statically generated pages be regenerated in the background after deployment, without rebuilding the entire site.
Overview
ISR addresses the central trade-off of Static Site Generation (SSG): fully static pages are fast and cheap, but updating their content normally requires rebuilding the whole site. ISR lets a developer specify a revalidation interval (or trigger it on demand) for a given page; the first request after that interval still serves the existing cached static HTML instantly, while the server regenerates a fresh version in the background and swaps it in for subsequent requests. This gives teams much of SSG's performance and cost profile — pages are served from a cache or CDN most of the time — while approaching the freshness of Server-Side Rendering (SSR) for content that changes periodically, such as product pages with updated pricing or inventory, or news articles that get occasional edits after publishing. ISR is most associated with Next.js, which introduced the pattern and popularized the term, though similar background-regeneration concepts have since appeared in other meta-frameworks under different names. It is particularly valuable for sites with too many pages to rebuild quickly on every content change (e.g., e-commerce catalogs with thousands of products).
Key Concepts
- Individual pages regenerate on a time interval or on-demand trigger
- Stale content is served instantly while fresh content regenerates in the background
- Avoids full-site rebuilds for large sites with frequent, isolated content changes
- Combines SSG's performance with closer-to-real-time content freshness
- Popularized by and most closely associated with Next.js