Next.js gives you multiple rendering strategies. They’re not “either/or” choices—you can mix them per route, per layout, and even per component. The best approach depends on data freshness, SEO, and time-to-first-byte.

CSR (Client-Side Rendering)

CSR renders the page in the browser. The server sends a minimal HTML shell, then React fetches data and builds the UI on the client.

  • Use when: highly interactive UI, data is user-specific, SEO is not critical.
  • Tradeoffs: slower first content for users, depends on JS, can be harder for SEO if content arrives late.

In the App Router, CSR usually means a "use client" component that fetches data in the browser.

SSR (Server-Side Rendering)

SSR renders HTML on the server for each request. Users get content immediately, and the client hydrates for interactivity.

  • Use when: content must be fresh per request, personalization, auth-gated pages.
  • Tradeoffs: higher server cost, slower than cached static HTML.

In App Router, SSR happens naturally when a Server Component fetches uncached data or the route is marked dynamic.

SSG (Static Site Generation)

SSG pre-renders pages at build time. The output is static HTML that can be served from a CDN.

  • Use when: content changes rarely, docs/marketing pages, predictable routes.
  • Tradeoffs: content is as fresh as your last build.

In App Router, SSG typically uses generateStaticParams() with cached data (or no data at all).

ISR (Incremental Static Regeneration)

ISR is “SSG + revalidation”. Pages are served statically, but Next.js can regenerate them after a time window (or on-demand), so you get CDN performance with controlled freshness.

  • Use when: content updates regularly but not every request (blogs, product pages).
  • Tradeoffs: users may see slightly stale content until revalidation runs.

Example pattern:

export const revalidate = 60; // regenerate at most once per minute

This repo uses that pattern on blog detail pages to balance freshness and speed.

PPR (Partial Pre-Rendering)

PPR (Partial Pre-Rendering) combines a static shell with dynamic streaming so users get a fast initial render, while personalized or frequently-changing parts stream in later.

  • Use when: most of the page is cacheable, but some parts must be dynamic (auth widgets, dashboards, “live” sections).
  • Tradeoffs: more complexity; feature availability/flags may change across Next.js versions.

PPR is conceptually similar to “static layout + dynamic islands”, but integrated into Next.js routing and streaming.

How to choose (quick rules)

  • Need SEO + fast load: prefer SSG/ISR.
  • Need per-request freshness or auth: use SSR.
  • Need heavy interactivity and user-specific use CSR for that part (not necessarily the whole page).
  • Mostly static but a few dynamic bits: consider PPR/streaming and keep the dynamic parts isolated.

How this site maps to these strategies

  • Blog pages: ISR (cached + revalidate) for good SEO and speed.
  • Admin: SSR/dynamic (auth-gated, always up-to-date).
  • Developer tools: mostly static UI with client-side interactivity (CSR inside Client Components).

The key is to choose the rendering strategy based on the user experience you want: first paint speed, SEO, and freshness.