← Back to the journal
Next.jsPerformanceWeb

Incremental Static Regeneration: the best of both worlds

Next.js 9.5 introduced ISR — static speed with fresh content. Why it changed how I ship content sites for good.

For a long time I had to choose: static or dynamic. Static pages are lightning fast, but every content change means rebuilding the whole site. Dynamic pages stay fresh, but every request costs compute time on the server. With Next.js 9.5, in the summer of 2020, that choice is finally off the table.

What ISR actually does

Incremental Static Regeneration builds a page once, statically, and serves it from cache — as fast as a plain HTML file. The clever part: after a set interval, Next.js rebuilds the page in the background as soon as someone requests it again. The first visitors still see the old version, everyone after sees the fresh one.

export async function getStaticProps() {
  const posts = await fetchPosts();
  return {
    props: { posts },
    revalidate: 60, // rebuild at most every 60 seconds
  };
}

That single line, revalidate, is the whole trick. You no longer have to redeploy the entire site just because one blog entry changed.

Fast and current used to be a contradiction. ISR turns it into a configuration value.

Why it convinces me

I build a lot for ateliers, small studios, and portfolios — sites that are updated rarely, but still regularly. Until now that meant a full rebuild on every change, which can take minutes once there are many pages. With ISR, only the affected page refreshes, and without me triggering anything at all.

For visitors this means load times like a pure static site; for my clients it means their content stays current without any technical hurdle. Nobody has to wait for a deploy.

What I watch out for

ISR isn't a cure-all. For highly dynamic data — shopping carts, live prices — server-side rendering remains the better choice. And the revalidate interval wants to be chosen with care: too short, and you give away the caching advantage; too long, and the content starts to feel stale.

For the vast majority of content sites, though, ISR has changed my default architecture. It's one of those rare features that doesn't work around an old dilemma but dissolves it — and to me, that's the most elegant kind of progress.