ISR (Incremental Static Regeneration).
ISR (Incremental Static Regeneration) is a technique from Next.js in which statically pre-rendered pages are regenerated individually while the site is live, without rebuilding the whole website. Visitors keep receiving a fast, cached page while it is updated in the background after a set interval or on demand. ISR thus combines the speed of static pages with up-to-date content.
ISR (Incremental Static Regeneration) — Explained in Detail
There are broadly three ways to generate a page. With static site generation (SSG), the HTML is created once at build time and then delivered unchanged: very fast, but only as current as the last build. With server-side rendering, the HTML is created afresh on every request: always current, but with computing effort per request. ISR sits in between: the page is generated statically and cached, but can be regenerated individually while the site is live.
The classic flow is time-based. A page is given a revalidation interval, for example one hour. If someone requests the page after that interval has expired, they first still receive the existing version while Next.js generates a new one in the background. The next visitor then sees the updated page. This pattern is called 'stale-while-revalidate': better to show the old version briefly than to make the visitor wait.
On-demand revalidation is more widely used today. Here a page is regenerated not on a timer but deliberately as soon as its data changes, for instance when an article is saved in the headless CMS or a price is adjusted in the shop. The CMS calls a protected endpoint that revalidates exactly that page, or all pages with a particular tag. Content stays current without rebuilding a thousand pages for every small change.
ISR suits search engines well, because every page comes as finished HTML from the cache. That ensures a short time to first byte and fully readable content without JavaScript. Pages that did not yet exist at build time can be generated on first request and then cached as well, which is practical for large catalogues where not every page should be built in advance.
When ISR fits and when it does not
ISR suits content that changes occasionally and looks the same for every visitor: service pages, blog and magazine articles, product pages, glossary terms, location pages. It does not suit content that differs per person, such as a shopping basket, a customer account or a dashboard. Those parts are rendered dynamically or loaded in the browser, often on the same page next to static sections.
Honest expectations about freshness matter too: with time-based revalidation, at least one visitor still sees the old version after a change. Where that is not acceptable, such as with prices or availability, on-demand revalidation is the right choice. These trade-offs are part of the architecture we define in our web development in Zurich and when you have a website built.
Example: a restaurant with a changing menu
A typical case, described as an example: a restaurant maintains its menu in a CMS, and each dish has its own page. The menu changes a few times a week. Rebuilding the entire website for every change would be unnecessary, and so would a server computation on every request.
With ISR the pages are delivered statically. When the team saves a change in the CMS, this triggers an on-demand revalidation of the affected dish and the menu overview. Guests see the new version within seconds, the pages stay fast, and Google always finds complete HTML.
Related Page
Server-Side RenderingFrequently Asked Questions About ISR (Incremental Static Regeneration)
With SSG, each page is generated once at build time and only updated at the next build. With ISR, each page can be regenerated individually while the site is live, on a timer or on demand. ISR is static generation with subsequent updating.
The term ISR comes from Next.js. Other frameworks and hosting platforms offer comparable patterns under different names, usually based on caching with stale-while-revalidate. The principle is the same: deliver statically, renew in the background.
With time-based revalidation, the first visitor after the interval has expired may still see the old version. With on-demand revalidation, the page is regenerated directly after the change, and the delay is then usually only seconds.
More Terms Starting with "I"
Indexing
Indexing is the process by which search engines like Google add web pages to their index. Only index...
INP (Interaction to Next Paint)
INP is the newest Core Web Vital from Google and measures the responsiveness of a website: How quick...
Internal Linking
Internal linking means linking pages within the same website. Internal links guide users through the...
Ready for Your Project?
Apply this knowledge to your website — DLM Digital will help you.