Encited logo
PricingTalk to sales
SSR vs CSR: Differences, Pros and Cons, and When to Use Which

SSR vs CSR: Differences, Pros and Cons, and When to Use Which

Nov 27, 2026November 27, 2026·by Aki from Encited

SSR vs CSR compared: how each builds the page, load speed, server cost, SEO and AI crawlers, code examples in Express and Next.js, and which to pick.

SSR vs CSR is a choice about where your page's HTML gets built. With server-side rendering (SSR), your server builds the HTML for each request and sends a page that already has content in it. With client-side rendering (CSR), the server sends a near-empty HTML file and a JavaScript bundle, and the visitor's browser builds the page.

That one difference decides how fast the first content appears, how much your servers do, how the app feels after it loads, and whether search engines and AI crawlers can read the page. Public pages that need search traffic lean toward SSR. Logged-in apps lean toward CSR. Most real projects use both.

TL;DR

  • CSR: the browser builds the page from JavaScript. Cheap static hosting and smooth navigation after the first load, with a slower first paint and an empty page for crawlers that don't run JavaScript.
  • SSR: the server builds the HTML on every request. Content shows up sooner and crawlers get it in the first response, at the cost of server compute and more moving parts.
  • SEO: Google renders CSR pages later, in a second pass. The crawlers behind ChatGPT, Claude and Perplexity don't run JavaScript at all.
  • Pick SSR for public, content-heavy pages and stores. Pick CSR for dashboards and tools behind a login.
  • Keep CSR and still get crawled by putting pre-rendering in front of the app.

What is client-side rendering (CSR)?

In client-side rendering, the server returns the same small HTML file for every URL. It holds a root element and script tags:

html
CopyDownload
<!doctype html>
<html>
<head>
<title>Store</title>
<script type="module" src="/assets/index-4f2a.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>

The browser downloads the bundle, runs it, fetches data from your API, and renders the interface into #root. After that first load, moving between pages happens in the browser: the app swaps components and fetches only the data it needs, with no full page reload.

This is the default for single-page apps built with React and Vite, Vue, Angular and Svelte without a server framework. Most AI website builders, such as Lovable, Bolt and Base44, also produce client-side apps.

Advantages of CSR

  • Cheap, simple hosting. The app is static files on a CDN. There is no server code to scale.
  • Fast navigation after the first load. Page changes don't wait for a server round trip to build HTML.
  • Rich interaction. Editors, maps, dashboards and other app-like screens are natural fits.
  • Clear split between frontend and API. The same API serves the web app and mobile apps.

Disadvantages of CSR

  • Slower first content. Nothing useful shows until the bundle has downloaded, parsed and run, and the data has arrived.
  • Hard on low-powered phones. All rendering work happens on the visitor's device, so slow CPUs feel it most.
  • Crawlers get an empty page. Any crawler that reads only the first response sees <div id="root"></div> and nothing else.
  • Broken status codes. Every URL returns 200, including routes that show a "not found" screen, which Google reports as soft 404s.

What is server-side rendering (SSR)?

In server-side rendering, the server runs your app code for each request, fetches the data, and sends finished HTML. The browser shows that HTML right away, then downloads the JavaScript and attaches event handlers to the existing markup. That last step is called hydration, and after it the page behaves like a client-side app.

Next.js, Nuxt, SvelteKit, Remix and React Router in framework mode, Angular with @angular/ssr, and traditional server stacks like PHP, Rails and Django all render on the server. Shopify themes and most CMS platforms do too.

Advantages of SSR

  • Content in the first response. Text, links, titles, canonical tags and structured data are all in the HTML.
  • Faster first paint, especially on slow devices, since the browser starts with markup.
  • Real status codes and redirects from the server for missing and moved pages.
  • Link previews work. LinkedIn, Slack and X read the title and image from the first response.

Disadvantages of SSR

  • Server compute on every request. Traffic spikes, including crawler traffic, become server load.
  • Slower time to first byte than a static file, because the server builds the page before it responds.
  • More complexity. Code has to run in two places, browser-only APIs like window need guarding, and hydration mismatches become a class of bug.
  • Hydration cost. The browser still downloads and runs the JavaScript before the page responds to clicks.

SSR vs CSR: key differences

Client-side rendering (CSR)Server-side rendering (SSR)
Where HTML is builtIn the visitor's browserOn your server, per request
First HTML responseEmpty shell and script tagsFull page content
Time to first byteFast, static file from a CDNSlower, server builds the page first
First and largest contentful paintLate, after JavaScript and data loadEarly, from the HTML
InteractivityAfter the bundle runsAfter hydration
Navigation after first loadFast, in the browserDepends: full reloads, or client-side routing after hydration
Server costStatic hostingServers or functions for every uncached request
Low-powered devicesHeavyLighter for the first view
GooglebotIndexed after a later rendering passIndexed from the first response
AI crawlers (GPTBot, ClaudeBot, PerplexityBot)Empty pageFull first response
Link previewsDefault title or nothingCorrect title and image
Development complexityLowerHigher

Which loads faster?

It depends on which moment you measure.

Time to first byte (TTFB) is usually lower for CSR, because the server returns a cached static file. SSR has to run code and often query a database before it sends anything.

First contentful paint (FCP) and largest contentful paint (LCP) are usually better with SSR. The HTML already contains the content, so the browser paints it as soon as it arrives. With CSR, the browser has to download, parse and execute the JavaScript, then fetch data, before the main content appears. On a slow phone or network, that gap grows.

Interaction to next paint (INP) depends on how much JavaScript runs. Both approaches ship the app's JavaScript. SSR pages can look ready before hydration finishes, and clicks during that window may not respond.

General numbers say little about your site, so measure your own pages. Lighthouse and PageSpeed Insights give lab data for one load, and the Chrome UX Report shows what real visitors on your site experience. Compare the same template rendered both ways if you can.

SSR vs CSR for SEO

Googlebot fetches the HTML, then puts JavaScript pages in a queue to render later in a headless browser. A CSR page gets indexed after that second pass. That usually works, with three common problems: a delay before new pages are indexed, content that loads too slowly to be captured, and script errors that leave Google with a partial page. Google's own JavaScript SEO basics recommend server-side or pre-rendering for this reason.

AI crawlers are stricter. In crawl data from Vercel and MERJ, GPTBot and ClaudeBot downloaded JavaScript files in some requests and executed none of them. A CSR page can be indexed in Google and still be empty to ChatGPT, Claude and Perplexity.

Link previews from LinkedIn, Slack, X and Facebook read the first response only, so a CSR page shares with the default title from index.html.

SSR fixes all three for content that's in the first response. Content that the page fetches in the browser after hydration, like reviews or prices loaded from an API, is still missing for crawlers on an SSR site.

To check what each crawler gets from one of your pages, run it through the crawler simulator. It fetches the URL as Googlebot, Bingbot or GPTBot and shows the raw HTML each one receives next to what a browser renders.

Code examples

CSR with React

jsx
CopyDownload
// main.jsx: runs in the browser
import { createRoot } from "react-dom/client";
import { useEffect, useState } from "react";
function Product() {
const [product, setProduct] = useState(null);
useEffect(() => {
fetch("/api/products/42").then((r) => r.json()).then(setProduct);
}, []);
if (!product) return <p>Loading…</p>;
return <h1>{product.name}</h1>;
}
createRoot(document.getElementById("root")).render(<Product />);

The server sends the index.html shell from earlier. A crawler that doesn't run JavaScript never sees the product name.

SSR with Express and React

jsx
CopyDownload
// server.jsx: runs on the server for each request
import express from "express";
import { renderToString } from "react-dom/server";
const app = express();
app.get("/products/:id", async (req, res) => {
const product = await db.products.find(req.params.id);
if (!product) return res.status(404).send("Not found");
const html = renderToString(<h1>{product.name}</h1>);
res.send(`<!doctype html>
<html>
<head><title>${product.name}</title></head>
<body>
<div id="root">${html}</div>
<script type="module" src="/assets/client.js"></script>
</body>
</html>`);
});
app.listen(3000);

The first response contains the product name and title, and the missing product returns a real 404. In the browser, client.js calls hydrateRoot on the same component to make it interactive. React 18 also offers renderToPipeableStream, which streams HTML as parts of the page become ready.

SSR and CSR in Next.js

In the Next.js App Router, components are server components by default and render on the server:

tsx
CopyDownload
// app/products/[id]/page.tsx: rendered on the server
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const product = await getProduct(id);
return <h1>{product.name}</h1>;
}

A file that starts with the "use client" directive becomes a client component. It still renders to HTML on the server for the first response, then hydrates in the browser, where hooks like useState work:

tsx
CopyDownload
"use client";
import { useState } from "react";
export function AddToCart() {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count + 1)}>Add ({count})</button>;
}

To skip server rendering for a component entirely, load it with next/dynamic and { ssr: false } from inside a client component. Anything loaded that way, or fetched in a useEffect, is missing from the first response.

How to tell if a site is SSR or CSR

  1. View the page source. Press Ctrl+U, or Cmd+Option+U on a Mac. If the text you see on the page is in the source, it was server-rendered or pre-rendered. If the body is a single <div id="root"> or <div id="app">, it's CSR.
  2. Disable JavaScript. In Chrome DevTools, open the command menu and run "Disable JavaScript", then reload. A CSR page goes blank.
  3. Fetch it from the command line. curl -A "Googlebot" https://example.com/page prints the first response a crawler gets.
  4. Look for framework markers. __NEXT_DATA__ or self.__next_f scripts point to Next.js, __NUXT__ to Nuxt. A Vite build with an empty root usually means a client-side app.

Combining SSR and CSR

Most modern frameworks mix the two on purpose:

  • SSR for the first load, CSR afterwards. Next.js, Nuxt and SvelteKit render the first page on the server, then handle navigation in the browser.
  • Islands. Astro sends static HTML and hydrates only the interactive components you mark.
  • React Server Components. Server components never ship their code to the browser, client components do, and both can live on one page.
  • Streaming SSR. The server sends the page shell first and streams slower sections as their data arrives.
  • CSR behind the login, SSR in front of it. Marketing pages and product pages are server-rendered, and the app itself is a client-side bundle.

When to use CSR

  • The screens sit behind a login and don't need to be indexed: dashboards, admin panels, internal tools.
  • The app is highly interactive and long-lived in one tab, like an editor or a design tool.
  • You want static hosting and a separate API, and the pages that need search traffic live elsewhere.

When to use SSR

  • Public pages that need search and AI traffic: product pages, category pages, articles, docs, landing pages.
  • Pages whose content changes often or depends on the request, where building them ahead of time isn't practical.
  • Pages shared on social networks and chat, where link previews matter.
  • Audiences on slower phones and networks, where first paint decides whether people stay.

If the content changes only when you deploy, static site generation often beats both. SSG vs SSR covers that choice, and SSR vs SSG vs pre-rendering adds what each one gives a crawler.

Keeping CSR without losing search traffic

Moving an existing client-side app to SSR touches routing, data fetching and every component that reads browser APIs. For many teams that's months of work, and for sites built with AI website builders it isn't possible at all.

Pre-rendering is the shortcut. A rule in front of the site detects crawlers by user agent and serves them a snapshot of the page, rendered in a real browser after all scripts and data have loaded. People keep getting the client-side app. Google treats it as acceptable as long as the snapshot matches what people see, and dynamic rendering for SEO covers when it's the right call.

To see whether your site is already readable to ChatGPT, Claude and Perplexity, run the AI crawl checker. It requests your page as each AI crawler and shows whether the content comes back.

Encited runs this for client-side apps and server-rendered sites, with a DNS change or a middleware rule and no changes to your code. Search engines get full HTML and AI crawlers get cleaned HTML or Markdown, from an edge cache in about 15 ms. Plans start at $19 a month, with a 14-day free trial.

FAQ

What is the difference between SSR and CSR? In SSR, the server builds the full HTML for each request, so the first response has content. In CSR, the server sends an empty HTML shell and JavaScript, and the browser builds the page.

Is React CSR or SSR by default? React renders in the browser by default. It renders on the server when you use a framework like Next.js or React Router in framework mode, or call react-dom/server yourself. More in React SEO.

Which is better, server-side or client-side rendering? Neither in general. SSR is better for public pages that need fast first content and search visibility. CSR is better for logged-in, highly interactive apps where indexing doesn't matter.

Which rendering technique gives faster initial page loads? SSR usually shows content sooner, because the HTML already contains it. CSR usually has a faster time to first byte, but the content appears only after the JavaScript runs and the data loads.

How does CSR affect low-powered mobile devices? All of the rendering work runs on the device, so slow CPUs take longer to show content and to respond to taps. Large bundles make it worse.

Is CSR bad for SEO? CSR alone is risky. Google indexes it after a delayed rendering pass, and AI crawlers and link previews get an empty page. Pre-rendering or SSR fixes that.

What is the difference between SSR, CSR and SSG? CSR builds the page in the browser. SSR builds it on the server for each request. SSG builds it once at deploy time and serves the same file to everyone. SSG vs SSR compares the last two in detail.

Can you combine SSR and CSR? Yes. Next.js, Nuxt, SvelteKit and Astro render the first page on the server and hydrate interactive parts in the browser, and you can opt individual components out of server rendering.

When should a developer choose CSR over SSR? When the pages don't need to be indexed, the app is interactive enough that server rendering adds little, and static hosting with a separate API keeps the stack simpler.

Google
Gemini
ChatGPT
Claude
Grok
Meta
Perplexity

Get discovered anywhere search happens

Readable, citable, outranking pages.

Talk to sales
Avatar
How can we help?
Get instant answers to your questions or leave a message for an engineer will reach out
Ask AI about Encited
See our docs
Contact support
Leave a message
We'll get back to you soon
Avatar
Ask AI about Encited
Product questions, troubleshooting and
Thinking
Preview
Drop an image to attach
Powered by ReplyMaven