// Definition
ISR (Incremental Static Regeneration) is a technique available in Next.js that combines the advantages of SSG (speed of static pages) with the flexibility of SSR (fresh data). Pages are generated statically and served from cache, but can automatically rebuild after changes.
Two ways ISR works:
- Time-based - the page rebuilds every X seconds (e.g., revalidate: 3600 = every hour)
- On-demand - the page rebuilds on demand, e.g., after a webhook from the CMS
Example of on-demand revalidation with cache tags:
// Fetching posts with the “posts” tag
fetchStrapi(“/posts”, { tags: [“posts”] });
// Webhook from CMS → rebuild only changed pages
revalidateTag(“posts”);Comparison with other approaches:
- SSG without ISR - 200 posts in 2 languages = 400 pages to rebuild with each change. ISR only rebuilds the one page that has changed
- SSR - page regenerated with each request. Slower than ISR, where the page is cached until it changes
- CSR - browser builds the page with JavaScript. Worse SEO, slower loading
When ISR works best:
- Blog with headless CMS - publish in Strapi/Contentful → page updated in seconds
- E-commerce store - prices and availability are updated without rebuilding
- Page with a large number of subpages - you don't have to rebuild 10,000 pages to change one
// Why it might matter to you?
ISR solves a problem that kills content creators' productivity: “I have to deploy to fix a typo.” If you're building a blog with a headless CMS (Strapi, Contentful, Sanity), ISR lets you click “Publish” in the CMS panel and the page automatically refreshes its content. No deployments, no waiting for builds.
// Related terms
// Want more actionable stuff?
Practical marketing tactics for developers. No theory, just things you can implement.
Join developers who are already reading.