Incremental static regeneration (ISR) is a rendering strategy for web applications in which prebuilt static pages are regenerated individually after deployment, either on a timer or on demand, without rebuilding the whole site. It combines the speed and cacheability of static site generation with the freshness that server-side rendering normally provides.
The technique was popularized by Next.js and has since been adopted, under various names, by other frameworks and hosting platforms. ISR treats every page as a cached artifact with an expiry policy: visitors receive the stored HTML immediately, while the server refreshes outdated copies in the background.
How incremental static regeneration serves and refreshes pages
ISR follows the stale-while-revalidate pattern known from HTTP caching. Each generated page carries a revalidation interval, for example 60 seconds. Requests inside that window receive the cached page. The first request after the window expires still receives the cached, now stale, page, but it also triggers a background regeneration. Once the new version is generated successfully, it replaces the old one for all subsequent visitors.
Pages that were not generated at build time can be created on first request. The framework renders the page on the server, stores the result, and serves it statically from then on. This lets a catalog with millions of URLs deploy with only its most popular pages prebuilt.
The lifecycle of a single page under ISR can be summarized in the following stages.
| Stage | What the visitor receives | What the server does |
|---|---|---|
| Build time | Nothing yet | Prerenders selected pages to HTML and data files |
| Fresh window | Cached page, instantly | Nothing |
| First request after expiry | Stale cached page | Starts background regeneration |
| Regeneration succeeds | New page on next request | Replaces cache entry |
| Regeneration fails | Last good page | Keeps old entry, retries later |
| Unbuilt path requested | Rendered page or fallback | Renders, then caches the result |
A crucial property is graceful failure. If the data source is unreachable during regeneration, the previously generated page remains in service, so a database outage degrades freshness rather than availability.
Time-based and on-demand revalidation
ISR offers two ways to decide when a page is outdated. Time-based revalidation relies on a fixed interval; on-demand revalidation lets an external event, such as a content management system webhook, invalidate a specific path or a cache tag immediately. Most production systems combine both.
| Mode | Trigger | Freshness | Typical use |
|---|---|---|---|
| Time-based | Interval elapses, then a request arrives | Bounded by interval plus one request | News lists, prices updated hourly |
| On-demand by path | API call or webhook naming a URL | Seconds after the change | Edited article or product page |
| On-demand by tag | Webhook naming a data tag | Seconds, across many pages | Shared navigation or category data |
| Combined | Webhook plus fallback interval | Fast, with a safety net | Most content-driven sites |
Time-based revalidation is lazy by design: a page that nobody visits is never regenerated, which saves compute but means a rarely visited page can be much older than its interval when the next visitor arrives. That visitor still sees the stale version once. On-demand revalidation removes this delay for content whose changes are known, which is why editorial teams usually prefer it.
ISR compared with SSG, SSR and client-side rendering
ISR occupies the middle ground between SSG and SSR. It inherits the delivery model of static generation and borrows the per-request data access of server rendering, but only for regeneration rather than for every visit. The table contrasts the main rendering strategies used in web applications.
| Strategy | When HTML is produced | Data freshness | Server cost per visit | TTFB |
|---|---|---|---|---|
| SSG | Only at build time | Until next full build | None | Very low |
| ISR | Build time and in background | Within interval or on demand | Near zero | Very low |
| SSR | On every request | Real time | High | Depends on data latency |
| Client-side rendering | In the browser | Real time | Low for HTML, API calls remain | Low, but late content |
Pages produced by ISR still go through hydration in the browser when they contain interactive components, exactly as SSG pages do. ISR therefore does not reduce JavaScript cost; it addresses server response time and data freshness, not client execution.
When to choose incremental static regeneration
ISR fits content that is read far more often than it changes and that is identical for every visitor. It is a poor fit for personalized or per-user content, because a cached page is shared by everyone who requests that URL.
| Situation | Recommended approach | Reason |
|---|---|---|
| Large product catalog, prices change hourly | ISR with tags and interval | Fast pages, controlled staleness |
| Editorial site with a headless CMS | ISR with on-demand webhooks | Edits appear within seconds |
| Account dashboard or shopping cart | SSR or client-side rendering | Content is per user |
| Stock tickers or live scores | SSR or streaming updates | Seconds of staleness unacceptable |
| Documentation updated per release | Plain SSG | Full rebuild is cheap and predictable |
A practical pattern is to mix strategies per route: the catalog uses ISR, the checkout uses SSR, and personalized widgets on otherwise static pages load on the client. Choosing the interval is a business decision, so teams should ask how stale a page may be before it causes harm, then set the interval and webhook coverage accordingly.
Limitations and operational pitfalls
ISR depends on a runtime that can store and replace cached pages, so it does not work on purely static file hosting. Its behavior also differs between hosting platforms, especially regarding where the cache lives and how it propagates across regions. Common problems include the following:
- Inconsistent caches across regions, where one edge location serves a newer page than another for a short period.
- Cascading staleness, when a listing page and its detail pages revalidate on different schedules and show conflicting data.
- Accidental personalization, where cookies or headers read during regeneration leak one visitor’s data into a shared page.
- Webhook gaps, when a content change has no matching invalidation call and the page waits for its interval.
- Underestimated regeneration load, when a short interval on thousands of busy pages turns ISR back into near-continuous server rendering.
Monitoring should therefore track regeneration errors, cache hit ratio and content age, not only response time, because a fast page that silently stopped refreshing is a correctness failure.
A plain-language summary
Imagine a bakery that bakes a batch of bread every morning and sells loaves straight from the shelf, so nobody waits. Every so often, or whenever the recipe changes, the baker quietly bakes a fresh batch and swaps it onto the shelf. Customers always get bread immediately, and the bread is never more than a little old.
Incremental static regeneration does the same with web pages. The site keeps ready-made copies so pages open instantly, and it refreshes each copy in the background when it is due or when an editor changes something, instead of rebuilding the entire website.
An example from practice
An online furniture store has 180,000 product pages. A full static build takes almost two hours, which made same-day price corrections impossible, while server rendering every page pushed TTFB above 900 milliseconds during sales because each request queried the inventory service.
The team moves product pages to ISR. Only the 5,000 best-selling products are prebuilt; the rest are generated on first request. Each page carries a revalidation interval of 15 minutes, and the inventory system sends an on-demand revalidation webhook whenever a price or stock level changes.
After the change, median TTFB falls to roughly 80 milliseconds because nearly every request is a cache hit, deployments finish in about ten minutes, and corrected prices appear on the live page within seconds of being saved.