Suggest an editImprove this articleRefine the answer for “What is ISR and what problem does it solve?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**ISR (Incremental Static Regeneration)** is a mechanism that lets you update static pages after the build without a full application rebuild. **Key point:** ISR removes the dependency on a full rebuild.Shown above the full answer for quick recall.Answer (EN)Image**ISR (Incremental Static Regeneration)** is a mechanism that lets you **update static pages after the build**, **without a full application rebuild**. In short: > **SSG + automatic content updates = ISR** --- ## What problem ISR solves ### The problem with SSG With classic **SSG**: - pages are generated **once** - to update content -> you need a **new build** - on a large site (1000+ pages) this is: - slow - expensive - inconvenient **ISR removes the dependency on a full rebuild.** --- ## How ISR works Using **Next.js** as an example: 1. The page is generated **statically** 2. Users get the HTML from a CDN 3. A set amount of time passes (`revalidate`) 4. On the next request: - the user gets the **old page** - **in the background** a new version is generated 5. The new version is cached and used going forward No downtime. No waiting. --- ## What makes ISR special - speed on par with SSG - data updates automatically - the server doesn't render the page on every request - cheaper than SSR --- ## When to use ISR - blogs - product catalogs - marketplaces - courses and articles - pages with periodic data updates The content **changes**, but **not every second**. --- ## When ISR is NOT needed - personalized data - content depends on cookies / auth - realtime (chats, bidding) There, **SSR** or **CSR** is better. --- ## Example (conceptual) ```ts fetch('https://api.example.com/posts', { next: { revalidate: 60 } // revalidate once a minute }) ``` - 60 seconds is the acceptable "staleness" of the data - after that, Next.js will refresh the page automatically --- ## ISR vs SSG vs SSR (very brief) | | SSG | ISR | SSR | |---|---|---|---| | HTML ready in advance | Yes | Yes | No | | Update without a build | No | Yes | Yes | | Speed | Very high | Very high | High | | Server load | None | Low | High | --- ## Interview answer > **ISR is a Next.js mechanism that lets you update static pages after the build without a full application rebuild, keeping SSG's speed and data freshness.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.