Illustration of a developer sitting with a laptop, surrounded by floating code-editor windows and a flowchart, on a teal background

Demystifying Rendering Modes - SPA/CSR, SSR, SSG, OMG 😱

blog post publisher

Andi Nicolescu

CTO

Reading time: 9 min

Published: Sep 23, 2022

Key takeaways

  • In the CSR vs SSR vs SSG comparison, CSR (the model behind a Single Page App) renders HTML in the browser from a minimal initial page and JavaScript, giving app-like navigation but weaker SEO and slower first paint on low-end devices.
  • SSR generates the full HTML on the server for each request, so content is crawlable and the initial load is fast, at the cost of higher server load and a delay before hydration makes the page interactive.
  • SSG pre-renders every page to static HTML at build time, delivering the fastest loads and excellent SEO, but it suits content that changes rarely since updates require a rebuild.
  • Hydration is the step where the browser re-runs the JavaScript over server- or build-rendered HTML to attach interactivity; it is central to both SSR and SSG.
  • Choosing a rendering strategy comes down to your SEO needs, content update frequency, and hosting budget rather than a single best web rendering mode for every project.
spa vs ssr
ssg vs spa

Web development has been around for a while — more than 35 years, in fact. Sir Tim Berners-Lee made the first successful communication between an HTTP client and a server back in the autumn of 1989. That first website was nothing more than a static page explaining how to create web pages and what hypertext was. A few years later, in '93, dynamic websites arrived with CGI (the Common Gateway Interface), which let a website run scripts (usually Perl back then) on the server and display the output.

From there, web technologies boomed and the ways of building websites changed dramatically. This article won't compare specific tools. Instead, it focuses on the different methods we can use to render websites, with examples in front-end Nuxt.js.

If you're new to front-end, these acronyms can be confusing at first — they were for me too. The trickiest pair is CSR and SPA, because people sometimes say "SPA" when they mean "CSR," and sometimes treat them as completely separate things. Let's clear that up.

CSR stands for Client-Side Rendering, and SPA for Single Page Application. Client-Side Rendering is the approach where the HTML is rendered in the user's browser. A Single Page Application is the type of web app that uses this approach as its core behaviour. In short, CSR is the model, and an SPA is the kind of app built on it. In an SPA, the server's initial response is often a bare-bones HTML template that JavaScript then fills with content.

Instead of serving a different HTML page per route, a client-side rendered site builds each route dynamically in the browser. This only became popular once JavaScript frameworks like React, Vue, and Angular took off.

What is a Single Page Application?

A Single Page Application (SPA) loads and updates content dynamically without refreshing the whole page. On the first load, it downloads all the HTML, CSS, and JavaScript it needs at once. After that, clicking around only swaps the content that changes, so there's no full-page reload.

The result feels smooth and app-like — closer to a native app than a traditional website.

SPA architecture

An SPA rewrites the current page with new data from the server instead of fetching a brand-new page for every interaction. A traditional multi-page site sends a complete HTML file for each page. An SPA sends the repeating shell (headers, footers, navigation) once, then fills in the right content. This makes navigation faster and more fluid, which matters a lot for things like digital commerce.

Let's make it concrete. Say you're building a web app from scratch. When you create a new Nuxt.js app, it asks you to choose a rendering mode — essentially, where your JavaScript should turn Vue components into HTML.

Nuxt.js setup prompt asking which rendering mode to use

The question it's really asking is: "Where do you want your JS to render the HTML — in the user's browser (Single Page App) or on a web server (Universal)?"

The right answer depends on your app's needs. And because the initial load time directly affects both user experience and SEO, techniques like prerendering, caching, and progressive loading matter too.

Client-Side Rendering (CSR)

With CSR, the browser does the rendering. The server sends a minimal HTML file, and JavaScript builds the content on the client. It's the model behind most SPAs, and it gives a fast, seamless feel because only the parts that change get updated. The catch: SEO can suffer, since some crawlers struggle to index content that depends on JavaScript.

Server-Side Rendering (SSR)

With SSR, the server renders the content. It generates the full HTML and sends it to the browser, so the content is visible immediately. This is great for SEO and fast initial loads, but it adds server load and can delay the moment the page becomes interactive.

Static Site Generation (SSG)

With SSG, the content is rendered at build time. The pages are generated once into static HTML files and served as-is. Think of it like pre-cooking a meal and storing it ready to serve — pages load fast and index well. The trade-off: it suits content that changes rarely, since any update means rebuilding the static files.

How important is SEO for your web app?

Your SEO needs are the easiest way to narrow down the right rendering mode.

If SEO isn't important: Client-Side Rendering

If you don't need strong SEO, CSR is a fine choice. Frameworks like Angular and Vue made in-browser routing a smooth alternative to the old full-page-refresh approach (the classic PHP days). Imagine refreshing the whole page every time you posted a comment or hit "like" — not fun.

But what about SPA SEO? This is the main downside. Some crawlers don't execute client-side JavaScript, so they see an empty HTML page before the content has rendered. Google may also penalise pages that do heavy processing on the main thread, and performance can suffer because rendering relies on the user's device and network speed.

Diagram of a search crawler receiving an empty HTML page from a client-side rendered app

That said, CSR has real strengths:

    • Development speed. Working entirely on the client, you don't have to worry about server compatibility — for example, browser-only APIs like the window object.
    • Hosting costs. There's no rendering server to run, so you can host an SPA on any static host that serves HTML, CSS, and JavaScript.
    • Performance. Because it loads a single page and simulates the rest, CSR puts less pressure on memory and processing, often giving quicker in-app navigation than SSR.

If SEO matters: SSR or SSG

SSR (Server-Side Rendering)

Diagram of server-side rendering sending fully rendered HTML to the browser

Unlike CSR, SSR returns a fully rendered HTML page, because the Vue code has already run on the server. The page is visible right away, even before it's interactive. Making it interactive is called hydration — the browser downloads the JavaScript and Vue takes over the page. SSR gives crawlers real content to index and proper social-media link previews, while still allowing dynamic interfaces. The caveats:

    • Hosting costs. Rendering JavaScript on your own servers increases maintenance costs.
    • Slower time-to-interactive. Users see content sooner, but clicks may do nothing until hydration finishes.
    • UI-library compatibility. Libraries that rely on window or document can break, since the server has neither (Nuxt will throw hydration errors).

SSG (Static Site Generation)

Static Site Generation is like SSR, except pages are rendered at build time instead of on each request. Every page is generated into HTML and JavaScript, and API calls are pre-fetched and cached, so no API calls happen during client-side navigation.

This fits best when you don't need a dynamic, user-specific site — no logins, no user input, everything "read-only."

nuxt generate command exporting a Nuxt application to static HTML

Pros:

    • No server costs — you can host on a global CDN like Netlify, served quickly and consistently.
    • Content is immediately available, just like SSR, with no extra API calls.
    • Great for SEO, since the HTML is built before reaching the client.

Cons:

    • Build time grows with the size of the app.
    • Data is fetched only at build time, so you can't retrieve data dynamically based on user input.
    • You may hit the same window-object compatibility issues as SSR, since window isn't available at build time.

In conclusion

None of these acronyms is a one-size-fits-all solution. Assess your site's technical needs before choosing. Here's the short version:

    • SSR suits complex, interactive web apps that rely on a database or change frequently and still need SEO — at the cost of server maintenance.
    • SSG suits low-cost sites whose content rarely changes and isn't user-specific, like a small presentation site or a landing page.
    • CSR suits apps where SEO doesn't matter but you need a rich UI with smooth navigation and no server round-trips — and it can be hosted cheaply on a CDN or static host like Amazon S3 or Netlify.

If you're looking for a web and mobile development partner to turn your idea into a successful product, we're just an email away. Contact us at contact@wolfpack-digital.com.

Frequently asked questions

CSR (Client-Side Rendering) builds pages in the user's browser with JavaScript, SSR (Server-Side Rendering) builds the full HTML on the server for each request, and SSG (Static Site Generation) pre-builds every page to static HTML at build time. In short, the CSR vs SSR vs SSG choice is about where and when your HTML is rendered. Each mode trades off SEO, performance, and infrastructure cost differently.
SSR is generally better for SEO because the server returns fully rendered HTML that crawlers can index immediately, while CSR ships a near-empty page that some crawlers fail to render. If organic search matters, server-side rendering vs static is usually the better starting point than a pure SPA. Our web development team can help you pick and implement the right approach.
Hydration is the process where the browser downloads and re-executes the JavaScript over HTML that was already rendered on the server (SSR) or at build time (SSG). This attaches event listeners and state so the static markup becomes fully interactive. Until hydration completes, the page is visible but not yet responsive to clicks.
Choose SSG when your content changes infrequently and is the same for every user, such as marketing sites, landing pages, blogs, and documentation, because static files are cheap to host and load extremely fast. Choose SSR when content is dynamic, user-specific, or updates in real time and still needs to be crawlable. The server-side rendering vs static decision ultimately depends on how often your data changes.
Start by weighing three factors: how important SEO is, how often your content changes, and your hosting budget. SPA vs SSR vs SSG is rarely a one-size-fits-all answer, and modern frameworks like Nuxt let you mix modes per route. If you'd like guidance tailored to your product, get in touch with our team.
Andi Nicolescu

Written by

Andi Nicolescu

CTO

Andi is the Chief Technology Officer at Wolfpack Digital, where he leads technology strategy and oversees the delivery of award-winning web and mobile applications across diverse industries. With a background in Computer Science from the Technical University of Cluj-Napoca and a career path spanning Android development, web development, Scrum Master, and Product Manager roles, he brings a uniquely comprehensive perspective to technology leadership.


Starting as a self-taught Android developer, Andi has progressed through development, agile leadership, and product management roles—giving him deep understanding of different disciplines and the ability to bridge technical, product, and business perspectives. This cross-functional foundation enables him to make technology decisions that balance engineering excellence with user needs and business objectives.


Andi's technical expertise spans mobile and web development, cloud architecture, AI integration, DevOps practices, and modern development frameworks. He has been instrumental in establishing Wolfpack Digital's technical standards, architectural patterns, and development processes that enable the team to consistently deliver products earning millions of users and high satisfaction ratings.


Through his blog contributions, Andi shares insights on technology leadership, building effective engineering teams, technical decision-making under constraints, balancing innovation with stability, and navigating the CTO role in a fast-growing agency. His writing reflects hands-on experience leading technical teams through the full spectrum of product development challenges.


Areas of expertise: Technology strategy, software architecture, mobile development (Android), web development, product management, agile methodologies, team leadership, DevOps, cloud infrastructure, AI integration, cross-functional collaboration, technical decision-making.



View profile