What is ISR?
ISR (Incremental Static Regeneration) is a mechanism in Next.js that lets you update static pages on the server after the build, without rebuilding the entire project.
In other words: the page looks static, loads very fast, but its data can update over time.
Why ISR is needed at all
There are two extremes:
- Static generation -> very fast, but the data is "frozen"
- Server rendering on every request -> always fresh data, but slower and more expensive
ISR is the golden middle between them.
How ISR works step by step
- The project is built
- The page is generated as static
- Users get the ready HTML (very fast)
- Next.js tracks whether the page has gone stale
- If the refresh time has passed:
- the server regenerates the page in the background
- the cache is updated
- The next users get the updated version
Important: the user does not wait for a rebuild, they always get the page immediately
What "incremental" means
- not the whole site updates
- only specific pages
- and only when it's needed
For example:
- one article got updated
- only its page was rebuilt
- the rest of the site is untouched
A real-life example
Say there is:
- a product catalog
- prices change every few minutes
With ISR:
- the page loads as static
- the server refreshes it, say, once every 60 seconds
- users always see nearly up-to-date data
- without constant server requests
Why ISR is useful
ISR solves several problems at once:
- the speed of static pages
- refreshing data without a full build
- less load on the server
- good SEO
- scalability for large sites
Where ISR is used
In the Pages Router:
- through
getStaticPropswith a refresh setting
In the App Router (the modern approach in Next.js):
- through
fetchwith revalidation - or through manually refreshing the cache on an event
The essence is the same:
the page is static, but not forever
Limitations of ISR
ISR does not fit when:
- the data is strictly personal
- information must be absolutely up to date every second
- the page depends on the current user
In such cases you need server rendering on every request.
In short
ISR is:
-
static generation
-
automatic updates
-
without a full site rebuild
That's exactly why ISR is often used for:
- blogs
- catalogs
- marketing pages
- content platforms
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.