Skip to content

ISR

Incremental Static Regeneration

Spicy — senior dev territoryFrontend

ELI5 — The Vibe Check

ISR is the best of both SSG and SSR. Pages are pre-built statically but can automatically rebuild themselves in the background after a set time. Stale pages get regenerated when someone visits, so you get fast static speed without rebuilding the whole site for every content change.

Real Talk

ISR is a Next.js (and now Nuxt) feature that allows statically generated pages to be re-validated and regenerated after a configurable interval, without a full site rebuild. The first visitor after the revalidation window triggers a background regeneration while still being served the old cached page.

Show Me The Code

// Next.js ISR — rebuild this page at most every 60 seconds
export async function getStaticProps() {
  const data = await fetch('https://api.example.com/posts');
  return {
    props: { posts: await data.json() },
    revalidate: 60,
  };
}

When You'll Hear This

"Use ISR for product pages — they're mostly static but update occasionally." / "ISR is only properly supported in Next.js with Vercel or self-hosted infra."

Made with passive-aggressive love by manoga.digital. Powered by Claude.