Frameworks such as Next.js, Nuxt, SvelteKit and Astro let a team choose a rendering strategy for each route. The choice decides page speed, data freshness, what search engines see and hosting costs. One strategy for the whole site usually ends in slow builds, stale pages or high server bills.

For most content-heavy sites, the best setup mixes strategies by page type: static generation or ISR for pages every visitor sees the same way, server-side rendering for pages that depend on the request, and client-side rendering for interactive parts behind a login or below the main content.

This article compares the four strategies, explains their effect on speed, freshness, SEO and cost, maps page types to a strategy, explains ISR and describes a real Next.js project. It does not cover framework migrations or mobile app rendering.

Key takeaways

  • SSG and ISR serve ready-made HTML from a cache or CDN, which gives the fastest responses and the lowest hosting costs.
  • SSR always shows current data but makes every page view depend on the speed of the server and its data sources.
  • CSR keeps the server simple, but crawlers and slow devices see little until JavaScript has loaded and run.
  • ISR with on-demand revalidation suits large catalogs of pages built from a CMS or API: pages stay static and update within seconds of a content change.
  • Choose per route. A single site can use all four strategies.
  • On a delivered project, three static generation pipelines and five reusable components powered the product, vendor and event pages of a security events section.

The four strategies at a glance

SSGISRSSRCSR
When HTML is builtAt build timeAt build time, then rebuilt after an interval or on demandOn every requestIn the browser, after JavaScript loads
First responseFastest, served from a CDNFast, served from cacheDepends on the server and data sourcesFast, but the page is nearly empty
Data freshnessAs of the last buildWithin the revalidation window, or seconds after an on-demand updateAlways currentAlways current
What crawlers receiveFull HTMLFull HTMLFull HTMLMostly JavaScript, content appears after rendering
Hosting costLowestLowGrows with trafficLow on the server, the work moves to the visitor's device
Main riskLong builds on large sitesA visitor may briefly see an older versionSlow pages when an API or database is slowBlank or slow screens on weak devices and networks

How rendering affects speed, SEO, freshness and cost

Speed

Static and cached pages reach the visitor quickly because nothing is computed at request time. Server rendering adds the time needed to query data and build the page, so a slow API makes every page slow. Client rendering shows a page shell early, but the main content waits for JavaScript to download, run and fetch data. The guide to rendering on the web on web.dev recommends favoring server or static rendering and keeping client-side JavaScript lean, because the cost of JavaScript grows with the application.

SEO

Google can render JavaScript, but it does so in a separate step after crawling, and its JavaScript SEO guide still describes server-side or pre-rendering as a good idea, because it makes pages faster for users and crawlers and because some bots cannot run JavaScript. Several crawlers used by AI search tools also read only the initial HTML. Public pages that should rank or be cited are safer with SSG, ISR or SSR.

Freshness

SSG shows data as of the last build. ISR shows data as of the last regeneration, which can be a few seconds after a change when revalidation is triggered on demand. SSR and CSR always fetch current data. The question to ask is how quickly a change must appear, and for most content the honest answer is "within a minute", which ISR handles well.

Cost

Static pages served from a CDN cost little at any traffic level. SSR needs servers sized for peak traffic and puts load on databases and APIs with every view. A traffic spike on an SSR site is a capacity problem, and on a static or ISR site it is mostly a CDN bill.

A static page arriving complete compared with a client-rendered page loading a bundle first

Matching page types to a strategy

Page typeSuggested strategyReason
Marketing pages, documentation, blog postsSSGContent changes rarely and is the same for everyone
Thousands of product, listing or entity pages built from a CMS or APIISR with on-demand revalidationBuilds stay short, pages stay fast, edits appear within seconds
Search results and filtered listsSSR, or a static page that loads results in the browserEach query is different, so prebuilding every combination is impossible
Pages with prices or stock that change by the minuteISR with a short window, plus a small client-side refresh for the changing figureMost of the page can stay cached
Account areas and dashboards behind a loginCSR or SSRNo search traffic, data is personal and must never be cached for others
Live feeds and alertsA static or SSR page with client-side updatesThe shell loads fast, new items arrive through polling, server-sent events or WebSockets

For live updates, our guide to WebSockets, polling and server-sent events compares the options.

How ISR and on-demand revalidation work

The Next.js documentation on incremental static regeneration describes the sequence for the Pages Router:

  1. Build the known pages. During the build, the pages listed by getStaticPaths are generated.
  2. Serve from cache. Requests receive the cached page immediately.
  3. Revalidate after the window. Once the revalidate interval, for example 60 seconds, has passed, the next request still gets the cached page while a new version is generated in the background.
  4. Swap in the new version. When regeneration succeeds, later requests get the updated page.
  5. Generate unknown pages on first request. With a blocking fallback, a page that was not built in advance is generated the first time someone asks for it, then cached.

On-demand revalidation goes one step further. The CMS calls a protected API route, usually through a webhook, whenever an editor publishes a change, and only that page is regenerated. With on-demand revalidation in place, a long revalidation interval, or none at all, is fine. Our guide to webhooks explains how to make those calls reliable.

Two details matter in production. If data fetching fails during background regeneration, Next.js keeps serving the last good page, so throwing an error on a failed API response protects visitors from a broken or empty page. ISR also needs a running Node.js server, so it does not work with a pure static export, and self-hosted setups with several instances need a shared cache. The App Router expresses the same choices through route settings and fetch caching options.

Need a front-end engineer who knows Next.js rendering, caching and SEO? We add experienced React and Next.js developers to your team within weeks.

Explore staff augmentation

Technical decisions that sit next to the rendering choice

  • How many pages to prebuild. Generate the most visited pages at build time and leave the long tail to on-demand generation. A build that renders every one of 200,000 pages will eventually block releases.
  • Hydration cost. Server-rendered HTML still ships JavaScript to make it interactive. Keep interactive components small, and render static parts without client code where the framework allows it.
  • Cache headers. Make sure CDNs cache static and ISR pages, and that SSR pages with personal data are marked private. Our guide to caching strategies covers the layers.
  • SEO metadata. Generate titles, descriptions and structured data in the same data-fetching step as the page, so every dynamic route has correct metadata in its HTML.
  • Shared components. When the same data appears on several page types, build it once as a typed component that works in every rendering mode.

Static pages from an API: a security events section for a cybersecurity news site

A US cybersecurity news site launched a security events section to publish vulnerabilities, affected products, patch status and vendor context from its threat intelligence database. The same data had to appear on product, vendor and event pages, in search, in a list of recent events and in a live feed, each dynamic route needed its own SEO metadata, and the team wanted to stop building one-off tables every sprint.

An augmented .wrk front-end engineer, working with the client's backend and QA staff, built:

  • Three static generation pipelines with getStaticProps for the product, vendor and event routes, each combining API data with SEO metadata.
  • Five reusable React components in TypeScript with typed props and configurable columns and cells, documented in Storybook and covered by Jest and React Testing Library tests.
  • One flexible table component that replaced four separate table variants.
  • One event card component reused in search, recent events and live feed views.

Component interfaces were designed against real API payloads before the pages were assembled, and staging QA covered over 30 filter URL cases. The team now builds pages from shared blocks, and the contract-first API speeds up front-end delivery. Read the security events UI case study.

A reusable table component with vulnerability, product and vendor columns and its typed props

Questions to settle before choosing

  1. Is the content the same for every visitor? If yes, it can be static or ISR. If it depends on the user, it needs SSR or CSR.
  2. How quickly must changes appear? Seconds with on-demand revalidation, minutes with interval revalidation, instantly with SSR.
  3. How many URLs exist? Hundreds can be built every time. Hundreds of thousands need on-demand generation.
  4. Does search or AI traffic matter for this page? If yes, avoid relying on client-side rendering for the main content.
  5. How fast and reliable are the data sources? Slow APIs favor static generation, where their speed affects builds and not visitors.
  6. Where will the site run? Static hosting supports SSG only. ISR and SSR need a server or a platform that supports them.

Load testing shows how each choice behaves under peak traffic. Our guide to load testing covers how to run one.

Common mistakes

  • SSR everywhere. Every page view hits the database, and the site slows down exactly when traffic peaks.
  • Client rendering for public content. Pages that should rank arrive as empty shells for crawlers and slow phones.
  • Rebuilding the whole site for every edit. Builds grow until publishing a typo fix takes half an hour.
  • Long revalidation windows with no on-demand trigger. Editors publish a correction and visitors keep seeing the old version.
  • Caching personal pages at the CDN. A misconfigured SSR page can show one user's data to another.
  • Testing only the happy path. Dynamic routes and filters need tests for empty results, missing data and unusual combinations.
FAQ

Frequently asked questions

What is the difference between SSG and SSR?

SSG builds a page's HTML once at build time and serves the same file to every visitor. SSR builds the HTML on the server for each request, so it always shows current data but depends on server and data source speed for every page view.

What is ISR in Next.js?

Incremental static regeneration serves a prebuilt static page and regenerates it in the background after a set interval or when triggered on demand, for example by a CMS webhook, so pages stay fast and update without a full rebuild.

Is SSR better than SSG for SEO?

Both deliver complete HTML to crawlers, so both work well for SEO. SSG and ISR are usually faster, which helps user experience and page speed metrics. SSR is the better fit only when the page content depends on the request.

When should I use client-side rendering?

Use client-side rendering for interactive, personal or frequently changing parts of a site that do not need search traffic, such as dashboards, account areas, filters and live updates on top of a server-rendered page.

Can one site use several rendering strategies?

Yes. Frameworks such as Next.js, Nuxt and SvelteKit let each route use its own strategy, so marketing pages can be static, catalog pages can use ISR, search can use SSR and account areas can render in the browser.

To sum up

Choose the rendering strategy per page type. Use SSG for content that rarely changes, ISR with on-demand revalidation for large catalogs built from a CMS or API, SSR for pages that depend on the request and CSR for personal and interactive parts. Build shared components that work across all of them, protect personal pages from caching and test dynamic routes before launch.

.wrk provides React and Next.js developers and full product teams to companies in the US and Europe, with experience in static generation, caching and reusable component libraries.

Planning a new section or a rendering overhaul? Tell us about your pages, data sources and traffic, and we will propose a rendering and caching plan.

Explore staff augmentation