Web & App Development

SSR vs. CSR vs. SSG: Choosing the Right Rendering Strategy for Your Web App

Shubham Parmar8 min read
SSR vs CSR vs SSG — choosing a web app rendering strategy banner

In short: There is no single best rendering strategy for a whole app — the right choice is made per route. Use static site generation (SSG) for content that rarely changes (marketing pages, blog posts, documentation), server-side rendering (SSR) for dynamic pages that still need to rank or load fast on first visit (search results, product pages, personalized landing pages), and client-side rendering (CSR) for authenticated, app-like views that do not need to be indexed (dashboards, internal tools, settings screens).

What this means for you

  • Decide rendering mode route by route, not once for the entire app — a marketing site, a product catalog, and a logged-in dashboard rarely belong on the same strategy.
  • If a page needs to rank in search or must be instantly meaningful on a slow connection, it needs real HTML on first response — that rules out plain client-side rendering.
  • If a page is behind a login and never needs to be crawled, client-side rendering is usually the simplest and cheapest option, not a compromise.

Every framework pitches its own default, and every agency blog has an opinion, but the underlying question is the same one web.dev and the major frameworks converge on: match the rendering strategy to what each specific page needs, not to a single sitewide preference.

What SSR, CSR, and SSG actually mean

The three terms describe where the HTML for a page gets built, not how the app is written. The same React or Vue component tree can be rendered any of the three ways depending on when and where that rendering happens.

  • Client-side rendering (CSR). The server sends a near-empty HTML shell and a JavaScript bundle. The browser downloads the bundle, runs it, fetches data, and builds the page in place. The first response is fast to send but has little content in it until JavaScript finishes.
  • Server-side rendering (SSR). The server builds the full HTML for a page on every request, then sends it to the browser already populated. The browser still loads JavaScript afterward to make the page interactive (hydration), but there is real content on screen, and in the page source, before that happens.
  • Static site generation (SSG). The full HTML for a page is built once, ahead of time, at build time — not per request. The result is a plain HTML file served instantly from a CDN edge, with no server-side work happening when a visitor requests it.

Hybrid variants sit between these: incremental static regeneration (ISR) rebuilds a static page on a schedule or after a cache miss instead of on every request, and partial prerendering serves a static shell instantly while streaming in dynamic pieces. Both exist because most real sites need more than one of the three pure strategies.

The decision that actually matters: per route, not per app

The question to ask for each route is not "which rendering strategy is best" — it is "does this specific page need to be crawled and fast on first load, and how often does its content change." Four factors drive the answer:

  • Does it need to rank in search? A page that must be indexed and ranked needs full HTML in the initial response — that means SSR or SSG, not CSR. Google can execute JavaScript, but a client-rendered page still ships a blank shell first, which adds risk and delay to indexing a crawler does not need to tolerate when a server-rendered alternative exists.
  • How often does the content change? Content that is the same for every visitor and changes rarely (a pricing page, a blog post, documentation) is the textbook case for SSG — it is cheaper to serve and faster to load than rebuilding the same HTML on every request. Content that is different per request (search results, a live inventory count, a personalized feed) needs SSR, or ISR if "per request" can tolerate being "per few minutes" instead.
  • Is it personalized or behind a login? A dashboard, an account settings page, or an internal admin tool is rarely crawled and rarely needs to be meaningful before JavaScript runs — CSR is usually the simplest and cheapest fit, not a lesser option.
  • What can your infrastructure actually run? SSR needs a server (or edge function) running on every request, which is more infrastructure than a static file host. If a team doesn't want to operate that, SSG with a handful of CSR-rendered authenticated routes covers a large share of real products without it.

A decision framework

Page typeNeeds to rank?Recommended strategy
Marketing pages, blog posts, documentationYesSSG (ISR if content updates without a full redeploy)
Product or listing pages with changing dataYesSSR, or ISR if slightly stale data is acceptable
Search results, personalized landing pagesYesSSR
Authenticated dashboards, settings, internal toolsNoCSR
Highly interactive, data-heavy app views behind loginNoCSR, with code splitting to keep the initial bundle small

Performance: it's not just SEO

Rendering strategy also shows up directly in Core Web Vitals, which affect both user experience and search ranking:

  • TTFB (time to first byte). SSG wins here by default — a static file requires no server work. SSR adds server render time to every request's TTFB, which is the trade-off for always-fresh content.
  • LCP (largest contentful paint). SSR and SSG both put real content in the first response, so the browser can paint it immediately. CSR has to wait for JavaScript to download, parse, run, and fetch data before there is anything to paint — a much longer path to the same pixel.
  • INP (interaction to next paint). This one cuts the other way: a page with a smaller JavaScript bundle responds to clicks and typing faster, and CSR apps built with code-splitting in mind can keep that bundle lean because they are not also shipping a server rendering path.

A common mistake is treating a slow CSR page as a rendering problem when it is really a bundle-size problem: shipping JavaScript for interactions most visitors never trigger is often the bigger lever than switching rendering strategy entirely.

Hybrid approaches: you rarely pick just one

Almost every real product mixes strategies by route rather than committing to one for the whole app: a static marketing site and blog, server-rendered product or search pages, and a client-rendered dashboard behind the login wall are a completely normal combination inside a single codebase. Frameworks like Next.js, Nuxt, and Astro are built around exactly this per-route choice rather than a single app-wide setting, and this site itself is a static-generated build (via vite-react-ssg) for exactly that reason — the content is public, SEO-critical, and doesn't change per visitor.

What this means for your project

Picking the right rendering strategy per route is an architecture decision, not a line item you can price in isolation — it depends on how many route types your product has, how much of it needs to rank, and what your team is already set up to operate. That gets scoped during discovery against your actual product, not estimated generically in a blog post. Our web and app development work includes making this call as part of the architecture phase, before a line of page code gets written.

If the app behind the dashboard also needs to talk to other systems, the API contract matters as much as the rendering choice — see REST vs GraphQL for that decision.

Frequently asked questions

Which rendering strategy is best for SEO?

SSR and SSG are both SEO-safe because they deliver full HTML in the first response, which crawlers can read immediately without waiting on JavaScript. SSG is typically the strongest option when the content doesn't change per visitor, since the HTML is already built and served instantly from a CDN. Plain client-side rendering is the riskiest option for anything that needs to rank, because the initial response has little to no content until JavaScript runs.

Can you mix rendering strategies on the same website?

Yes, and most real products do. A typical split is a statically generated marketing site and blog, server-rendered pages for dynamic content like search results or product listings, and client-side rendering for authenticated dashboards and internal tools. Modern frameworks like Next.js, Nuxt, and Astro are designed around choosing the strategy per route rather than once for the whole app.

Is client-side rendering always bad for SEO?

Not always — it depends on whether the page needs to be indexed at all. Google can execute JavaScript and crawl client-rendered pages, but it adds delay and risk to indexing compared to a page that arrives with full HTML already in place. For a page behind a login that is never meant to rank, like a dashboard or an admin panel, that risk doesn't matter, and CSR is usually the simplest and cheapest choice.

What is incremental static regeneration (ISR) and do I need it?

ISR rebuilds a statically generated page on a schedule or after a cache expires, instead of at every full deploy or on every single request. It's a middle ground for content that changes but not on every visit — a product catalog with prices that update a few times a day is a common case. You need it when plain SSG's "rebuild the whole site to update one page" is too slow for how often the content actually changes, but full per-request SSR is more infrastructure than the use case needs.

Does rendering strategy affect Core Web Vitals and page speed?

Yes, directly. SSG typically gives the fastest time to first byte since no server work happens per request. SSR and SSG both help Largest Contentful Paint because real content is in the first response, while CSR has to wait for JavaScript to download and run before anything meaningful paints. Interaction responsiveness (INP) can go the other way, since a smaller client-side bundle — common in CSR apps built with code-splitting — responds to clicks and typing faster.

Sources

Need help putting this into practice?

Tech Programmer builds and ships this work for startups and enterprises. Tell us what you are trying to do and we will tell you what it takes.

Related reading