Back to Blog

SSR vs CSR vs SSG: Choosing a Rendering Approach for Performance

TL;DRServer-side rendering (SSR) sends finished HTML from the server, so content appears quickly and every crawler can read it. Client-side rendering (CSR) sends a mostly empty page and builds it with JavaScript in the browser, which suits logged-in apps but delays content and hides it from crawlers that don’t run JavaScript. Static generation (SSG) and incremental regeneration (ISR) pre-build HTML ahead of time for the best of both. For marketing sites, blogs and stores, put content in the initial HTML and add JavaScript only where interaction needs it. WordPress already does this by default.

Two sites can share the same layout, content and hosting and still perform very differently. Often the difference is where the HTML gets built: on the server before the response is sent, at build time before anyone visits, or in the visitor’s browser after JavaScript downloads. That decision affects Core Web Vitals, search visibility, how AI assistants see your content and how much your hosting has to do.

2 persons using laptop

This guide explains each rendering approach, how they affect performance and SEO, where WordPress fits, and how our front-end team decides which to use.

What rendering means

Rendering is the work of turning data and templates into the HTML a browser displays. Every page has to be rendered somewhere. The question is where and when:

  • Server-side rendering (SSR): the server builds the HTML for each request.
  • Client-side rendering (CSR): the browser builds the HTML with JavaScript after the page loads.
  • Static site generation (SSG): the HTML is built once, at deploy time, and served as files.
  • Incremental static regeneration (ISR) and hybrid rendering: pages are pre-built and then rebuilt in the background on a schedule or when content changes, mixed with SSR or CSR where needed.

Server-side rendering

With SSR, the server receives a request, fetches the data, runs the templates and returns complete HTML. The browser can start painting content as soon as the HTML and critical CSS arrive, before any JavaScript runs.

Strengths:

  • Content is in the first response, so it appears quickly and every crawler can read it.
  • Pages work on slow devices and connections, because the browser does less work.
  • Personalized or frequently changing content is always current.

Trade-offs:

  • The server does work on every request, so time to first byte (TTFB) depends on hosting, database queries and caching.
  • Without page caching, traffic spikes translate directly into server load.

In practice, SSR is almost always paired with a page cache or CDN, so most visitors receive a cached copy of HTML that was rendered once.

Client-side rendering

With CSR, the server sends a minimal HTML shell and a JavaScript bundle. The browser downloads and runs the bundle, which fetches data and builds the page. A typical CSR response looks like this:

<!doctype html>
<html lang="en">
  <head>
    <title>Products</title>
    <script type="module" src="/assets/app.js"></script>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>

Nothing meaningful is visible until app.js downloads, parses, runs and fetches its data. On a fast laptop that may be quick. On a mid-range phone over a mobile connection it can take several seconds.

Strengths:

  • After the first load, moving between views is fast because only data changes, not the whole page.
  • The server only serves static files and an API, which is simple to scale.
  • It suits rich, stateful interfaces such as dashboards, editors and internal tools.

Trade-offs:

  • Slower first content, which hurts Largest Contentful Paint (LCP).
  • Large bundles keep the main thread busy, which hurts Interaction to Next Paint (INP).
  • Content isn’t in the initial HTML, so crawlers that don’t run JavaScript see an empty page.

Static generation and incremental regeneration

SSG renders every page to HTML at build time. Visitors get plain files from a CDN, which is the fastest and cheapest way to serve content. The limitation is freshness: changing a page means rebuilding it, and large sites can take a long time to build.

ISR solves that by serving a pre-built page and regenerating it in the background after a set interval or when the CMS signals a change. In Next.js with the App Router, a page backed by WordPress’s REST API can be cached and refreshed every five minutes like this:

// app/blog/[slug]/page.js
export const revalidate = 300; // seconds

export default async function Post({ params }) {
  const { slug } = await params;
  const res = await fetch(
    `https://cms.example.com/wp-json/wp/v2/posts?slug=${slug}&_fields=title,content`
  );
  const [post] = await res.json();

  return (
    <article>
      <h1 dangerouslySetInnerHTML={{ __html: post.title.rendered }} />
      <div dangerouslySetInnerHTML={{ __html: post.content.rendered }} />
    </article>
  );
}

Most modern frameworks, including Next.js, Nuxt, SvelteKit and Astro, let you choose SSR, SSG or ISR per route. That hybrid approach is now the norm: static for marketing pages, server-rendered for search results and accounts, client-side for highly interactive widgets.

Hydration and why it matters

When a JavaScript framework renders on the server, the browser receives HTML that looks finished but isn’t interactive yet. Hydration is the step where the framework’s JavaScript loads, rebuilds its component tree in memory and attaches event handlers to the existing HTML.

Hydration is why a server-rendered React page can still have poor INP: the page is visible, but the main thread is busy hydrating, so taps and clicks wait. Approaches that reduce this cost include:

  • Islands architecture. Astro ships static HTML and hydrates only the components that need interaction.
  • React Server Components. Components that only display data render on the server and send no JavaScript to the browser.
  • Deferred hydration. Interactive components hydrate when they scroll into view or when the browser is idle.

How rendering affects Core Web Vitals

Google’s Core Web Vitals measure loading, responsiveness and visual stability. The “good” thresholds, measured at the 75th percentile of real visits, are LCP within 2.5 seconds, INP within 200 milliseconds and CLS under 0.1.

  • LCP (Largest Contentful Paint) favors SSR, SSG and ISR, because the main content and its image are in the first response. CSR delays LCP until JavaScript has run and data has arrived.
  • INP (Interaction to Next Paint), which replaced First Input Delay in 2024, is about main-thread work. Heavy hydration and large bundles hurt it whichever rendering approach you use. Shipping less JavaScript is the most reliable fix.
  • CLS (Cumulative Layout Shift) suffers when content pops in after load and pushes the layout around, which is common with CSR. Reserve space for images, embeds and late-loading components with explicit dimensions.

For a deeper look at measuring and fixing these metrics, see our step-by-step Core Web Vitals guide for WordPress.

SEO and AI crawlers

Googlebot can render JavaScript, but it processes pages in two stages: it reads the HTML first and renders JavaScript later, when resources allow. Content that only exists after rendering can be indexed late, and links generated by JavaScript may be discovered slowly.

Many other crawlers don’t run JavaScript at all. That includes most AI crawlers that feed assistants and answer engines, as well as social media link previews. If your content only appears after client-side rendering, those systems see an empty shell. As more discovery happens through AI answers, having your content in the initial HTML matters more, not less.

A quick way to check what non-rendering crawlers see is to fetch the raw HTML and look for a sentence from the page:

curl -s https://example.com/services/ | grep -c "a sentence from your page"

A result of 0 means that text isn’t in the server response. Our technical SEO and answer engine optimization work starts with exactly this kind of check.

Developer using a laptop while standing

Where WordPress fits

A standard WordPress site is server-side rendered. PHP builds each page from the database and theme templates, and a page cache, either at the host or through a caching plugin, serves the result to most visitors. That is why a well-built WordPress site does well on LCP and is fully readable by every crawler without extra work.

Where WordPress sites run into rendering problems, it is usually because client-side JavaScript was added on top: sliders that build content after load, product grids rendered by a script, or page builder widgets that load large libraries on every page. The fix is usually to render that content in PHP and keep JavaScript for interaction.

Headless WordPress uses WordPress only as the content source, through the REST API or WPGraphQL, with a separate front end built in a framework such as Next.js or Astro. It suits teams that need a JavaScript front end, multiple channels or very high traffic on a CDN. It also adds hosting, previews, forms and plugin compatibility work. We cover those trade-offs in our guide to headless WordPress.

How to choose

Project Recommended approach
Marketing site, blog, documentation SSR with page caching (standard WordPress), or SSG/ISR
Ecommerce catalog and product pages SSR or ISR, with client-side cart and checkout interactions
Search results, account areas SSR, not cached per user
Dashboards, editors, internal tools behind a login CSR, or SSR for the shell with client-side views
Content site that needs a JavaScript front end Headless with SSG/ISR and islands or server components

A simple rule covers most cases: if a page needs to be found, shared or cited, its content belongs in the initial HTML. Use client-side rendering for the parts of the experience that are private, personalized or highly interactive.

Frequently asked questions

Is SSR always faster than CSR?

For the first page view, server-rendered or pre-rendered HTML is almost always faster to show content. For moving between views in an app after it has loaded, CSR can feel faster because only data changes. Most sites benefit from SSR or SSG for first loads and client-side navigation where it helps.

Can Google index client-side rendered pages?

Yes, Googlebot renders JavaScript, but rendering can be delayed and errors can leave content unindexed. Other search engines, social previews and most AI crawlers are less capable. Putting important content in the initial HTML removes the risk.

Do I need headless WordPress for good performance?

No. A traditional WordPress theme on good hosting with page caching, optimized images and limited JavaScript can pass Core Web Vitals comfortably. Headless makes sense for specific architectural needs, not as a default performance fix.

What is hydration?

Hydration is the step where a JavaScript framework attaches interactivity to server-rendered HTML in the browser. It is necessary for interactive components, but hydrating a whole page is expensive, which is why islands and server components exist.

Get the rendering decision right from the start

Hey Reliable builds fast, crawlable front ends on WordPress, headless stacks and custom code, and our team chooses the rendering approach per page type rather than per framework. Learn more about our front-end development services, or get a proposal for your project.

Get started now

Start with a risk-free, no obligation proposal delivered to your inbox in one business day or less.

Get Started
  • 5-Star Rated Technical Partner
  • 100% White-Label - Sign our NDA
  • 90-Day Code Guarantee
Hey Reliable logo

Welcome to Hey Reliable

We’d love to hear from you. Please use the form below or email info@heyreliable.com.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.
Secret Link