Technical

Incremental Static Regeneration (ISR)

Incremental Static Regeneration (ISR) is a Next.js rendering strategy that allows statically generated pages to be updated after deployment, either on a timed schedule or on-demand, without a full rebuild.

ISR gives you the performance of SSG (pre-built HTML from CDN) with the freshness of SSR (updated content). Pages are generated at build time, then revalidated in the background after a specified time interval or when triggered programmatically.

This is ideal for content that changes occasionally — blog posts with updated information, product pages with changing prices, or documentation with periodic updates. Users always see a cached version (fast), while the next visitor after the revalidation window gets a freshly generated page.

In Next.js App Router, use `revalidate` in your fetch options or route segment config. For on-demand revalidation, use `revalidatePath()` or `revalidateTag()` in Server Actions or Route Handlers — perfect for webhook-triggered updates from a CMS.

Example

// Next.js App Router — time-based ISR
// app/blog/[slug]/page.tsx
export const revalidate = 3600; // Revalidate every hour

// On-demand ISR via Route Handler
// app/api/revalidate/route.ts
import { revalidatePath } from "next/cache";

export async function POST(request: Request) {
  const { path } = await request.json();
  revalidatePath(path);
  return Response.json({ revalidated: true });
}

Stop shipping broken SEO

Indxel validates your metadata, guards your CI/CD pipeline, and monitors indexation — so you never miss an SEO issue again.