Course contentsShow
← Web Development
Lesson 1718 of 2,98232. Server-Side Rendering ConceptsFree lesson

What is Server-Side Rendering (SSR)?

Understanding how servers generate full HTML pages before sending them to the browser.

What is Server-Side Rendering (SSR)?

You'll learn: How SSR delivers fully-formed HTML pages from the server, contrasting with client-side rendering approaches.

The Core Idea

Server-Side Rendering (SSR) is an approach where your web server generates the complete HTML content of a page before sending it to the browser. Instead of shipping a minimal HTML shell and letting JavaScript build the page (like CSR), the server does the heavy lifting upfront.

Think of it like ordering a meal: with CSR, you receive ingredients and a recipe to cook at home. With SSR, you receive a fully-prepared dish ready to eat immediately.

How SSR Works

When a user requests a page:

  1. The server receives the request
  2. The server executes your application code (often JavaScript/Node.js)
  3. The server generates complete HTML with all content populated
  4. The server sends this full HTML document to the browser
  5. The browser displays the page immediately
  6. JavaScript downloads and "hydrates" the page, making it interactive

The browser receives meaningful HTML right away—not just a <div id="root"></div> waiting for JavaScript to render content.

Why SSR Matters

SSR addresses some key CSR challenges:

  • Faster initial content display: Users see content before JavaScript executes
  • Better SEO: Search engines receive fully-formed HTML to index
  • Improved perceived performance: Content appears faster, even if full interactivity takes time
  • Works without JavaScript: Basic content displays even if JavaScript fails

The tradeoff is server complexity—your server must run application logic for every request, rather than serving static files.

Key Takeaway: SSR generates complete HTML pages on the server before sending them to browsers, providing faster initial content display and better SEO compared to client-side rendering approaches.