ISR - Incremental Static Regeneration

How it works: This page was generated at build time, but it regenerates every 60 seconds when there's traffic. You get the speed of SSG with the freshness of SSR!

Revalidation: Every 60 seconds (when visited)

Pros: Fast like SSG, updates automatically, scalable

Cons: Slightly more complex, eventual consistency

Users (ISR with 60s Revalidation)

Leanne Graham

@Bret

Sincere@april.biz

Gwenborough

Ervin Howell

@Antonette

Shanna@melissa.tv

Wisokyburgh

Clementine Bauch

@Samantha

Nathan@yesenia.net

McKenziehaven

Patricia Lebsack

@Karianne

Julianne.OConner@kory.org

South Elvis

Chelsey Dietrich

@Kamren

Lucio_Hettinger@annie.ca

Roscoeview

Mrs. Dennis Schulist

@Leopoldo_Corkery

Karley_Dach@jasper.info

South Christy

Kurtis Weissnat

@Elwyn.Skiles

Telly.Hoeger@billy.biz

Howemouth

Nicholas Runolfsdottir V

@Maxime_Nienow

Sherwood@rosamond.me

Aliyaview

Glenna Reichert

@Delphine

Chaim_McDermott@dana.io

Bartholomebury

Clementina DuBuque

@Moriah.Stanton

Rey.Padberg@karina.biz

Lebsackbury

Code Example:

export default async function ISRPage() {
  // Fetch happens at build time, then revalidates every 60 seconds
  const response = await fetch('https://api.example.com/users', {
    next: { revalidate: 60 } // ISR with 60 second revalidation
  })
  const users = await response.json()
  
  return <div>{/* Render users */}</div>
}

ISR Behavior:

  • • First visitor gets the cached version (fast)
  • • If cache is older than 60s, regeneration starts in background
  • • Next visitor gets the updated version
  • • No visitors = no regeneration (saves resources)