GitHub|Since 2007
Step 16

ISR (Incremental Static Regeneration)

Keep your static site fresh with live data updates in seconds, without needing a full project rebuild.

12 min

Keeping Data Fresh with ISR

Incremental Static Regeneration (ISR) allows you to update static content after you've built your site. You get the speed of a static site with the flexibility of a dynamic one.

How it Works

  1. Next.js builds your site as static HTML (Fastest possible delivery).
  2. You specify a `revalidate` time (e.g., 60 seconds).
  3. When a user visits after that time, Next.js triggers a background rebuild of just that page.
  4. The next visitor sees the updated content.

Example Usage

const res = await fetch('https://...', { next: { revalidate: 60 } });

Your site stays blazing fast because users are never waiting for a server to process code or a database to answer a query.

Comments and Discussion