Before a visitor sees a single pixel of your website, something has to turn your data and templates into HTML. Where that happens — on a server for every request, in the visitor's browser, or once at build time — is called your rendering strategy, and it quietly shapes almost everything that follows: how fast the first screen appears, how interactive the page feels, how much your hosting costs, and how easily the content can be crawled.
This guide explains Server-Side Rendering (SSR), Client-Side Rendering (CSR), and Static Site Generation (SSG) in plain terms, adds the hybrid approaches modern frameworks now offer, and gives you a practical way to choose — page by page, not just project by project.
1. What “Rendering” Actually Means
Every page is ultimately HTML, CSS, and JavaScript in the browser. Rendering is the step that combines your data (products, posts, user info) with your templates or components to produce that HTML. The three strategies differ only in when and where that step happens:
CSR
In the browser, after JavaScript downloads and runs.
SSR
On the server, fresh for every request.
SSG
On a build machine, once, before anyone visits.
If you've read our comparison of Single Page Applications vs Multi-Page Applications, this is the layer underneath that decision: SPAs traditionally rely on CSR, while classic MPAs rely on SSR — but modern frameworks let you mix all three.
2. Client-Side Rendering (CSR)
With CSR, the server sends an almost empty HTML shell plus a JavaScript bundle. The browser downloads the bundle, runs it, fetches data from an API, and only then builds the page. A typical CSR response looks like this:
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body>
<div id="root"></div> <!-- empty until JavaScript runs -->
<script src="/assets/app.4f2a.js"></script>
</body>
</html>
Strengths
- Smooth, app-like navigation once loaded — no full page reloads.
- Cheap, simple hosting: the frontend is just static files on a CDN.
- Clean separation between frontend and an API backend (see our REST vs GraphQL guide for how that API layer works).
Weaknesses
- Slow first view on weaker phones and networks: nothing meaningful shows until the bundle has downloaded, parsed, and executed, which often hurts Largest Contentful Paint.
- Crawlers and link-preview bots that don't execute JavaScript see the empty shell.
- Bundle size grows with the app, so it needs active management.
Best fit: logged-in dashboards, admin panels, internal tools, and anything behind a login where search visibility doesn't matter and users stay for long sessions.
3. Server-Side Rendering (SSR)
With SSR, the server builds the full HTML for each request and sends a ready-to-read page. This is how PHP, WordPress, Laravel, Django, and Rails sites have always worked. Modern JavaScript frameworks such as Next.js, Nuxt, SvelteKit, and Remix also render on the server, then hydrate the page — attaching JavaScript so it becomes interactive.
<?php
// Classic PHP SSR: data + template = HTML, on every request
$product = $db->query("SELECT name, price FROM products WHERE id = 42")->fetch();
?>
<h1><?= htmlspecialchars($product['name']) ?></h1>
<p>Price: ₹<?= number_format($product['price'], 2) ?></p>
Strengths
- Content is visible as soon as the HTML arrives — good for perceived speed and LCP.
- Every crawler, social preview bot, and screen reader receives complete content.
- Always fresh: prices, stock, and personalized data are current on every request.
Weaknesses
- Server work on every request means higher hosting cost and a slower Time to First Byte under load — unless you cache.
- With JavaScript frameworks, hydration can make a page look ready before it responds to clicks, which shows up in Interaction to Next Paint.
- More moving parts to operate: a running server instead of static files.
Best fit: e-commerce product and category pages, search results, news, and any page whose content changes often or depends on who is viewing it.
4. Static Site Generation (SSG)
SSG renders every page to HTML at build time. The output is a folder of plain files that a CDN can serve from the location nearest each visitor. Tools such as Astro, Hugo, Eleventy, Jekyll, and the static export modes of Next.js and Nuxt all work this way.
Strengths
- Usually the fastest option: no server work per request, just a file served from the edge.
- Very cheap to host and very hard to take down under traffic spikes.
- Small security surface — there's no live server code or database for attackers to reach.
Weaknesses
- Content is only as fresh as the last build; every change needs a rebuild and deploy.
- Build times grow with page count — tens of thousands of pages can take a long time.
- Personalized or per-user content must be loaded client-side after the static page arrives.
Best fit: marketing sites, blogs, documentation, portfolios, and landing pages — content that changes on an editorial schedule rather than every minute. SSG pairs especially well with a headless CMS that triggers a rebuild whenever an editor publishes.
5. Hybrid Approaches: ISR, Streaming, and Islands
The sharp lines between CSR, SSR, and SSG have blurred. Most modern frameworks let you choose per route, and several in-between techniques are now common:
Incremental Static Regeneration (ISR)
Pages are generated statically but re-generated in the background after a set interval or when content changes. Visitors get static-file speed, and content stays reasonably fresh without rebuilding the whole site. Ideal for large catalogs where most pages change occasionally.
Streaming SSR
The server sends the HTML in chunks: the page shell and fast content first, slower sections (like recommendations) as soon as their data is ready. Users see something useful earlier instead of waiting for the slowest database query.
Islands Architecture and Partial Hydration
The page is mostly static HTML, and only specific interactive “islands” — a cart button, an image carousel, a search box — load JavaScript. Astro popularized this, and it dramatically reduces the amount of JavaScript content-heavy sites ship.
Server Components
React Server Components (used in the Next.js App Router) render parts of the component tree only on the server and send no JavaScript for them at all. Interactive pieces are marked as client components. The result is SSR-style output with a much smaller client bundle. If you're still choosing a framework, our React vs Vue vs Angular comparison covers how each ecosystem approaches this.
6. Side-by-Side Comparison
| Factor | CSR | SSR | SSG |
|---|---|---|---|
| First content visible | Slowest | Fast | Fastest |
| Content freshness | Real-time | Real-time | As of last build |
| Server cost | Low (static + API) | Highest | Lowest |
| Crawlable HTML | Only after JS runs | Yes | Yes |
| Personalization | Easy | Easy | Needs client-side fetching |
| Typical tools | React + Vite, Vue SPA, Angular | PHP, Laravel, WordPress, Next.js, Nuxt | Astro, Hugo, Eleventy, Next.js export |
7. How to Choose
Decide per page type, not per project. Ask two questions of each kind of page:
- Does it need to be found by search engines or shared on social media? If yes, the HTML must arrive with content in it — use SSR or SSG.
- How often does its content change, and is it different per user? Rarely and the same for everyone → SSG. Frequently or per user → SSR (with caching). Behind a login → CSR is perfectly fine.
A typical online store ends up with all three: SSG for the home page, about page, and blog; SSR or ISR for product and category pages; and CSR for the account dashboard and order history.
Whichever you pick, rendering is only half of performance. You'll still need to keep CSS and JavaScript lean — see Critical CSS and Asset Minification — and measure the result against the metrics in our Core Web Vitals optimization guide. If you want your site to keep working offline once it's loaded, the next step is turning it into a Progressive Web App.
8. Frequently Asked Questions
Is a plain PHP website SSR?
Yes. Any site where the server builds HTML for each request — PHP, WordPress, Laravel — is server-side rendered. The term became popular again because JavaScript frameworks added SSR on top of what began as client-rendered apps.
Can Google index client-side rendered pages?
Google can render JavaScript, but rendering can be delayed and not every crawler or preview bot executes JavaScript at all. For public pages that need to be found and shared, sending content in the initial HTML is the safer choice.
What is hydration?
Hydration is the step where JavaScript runs in the browser and attaches event handlers to server-rendered HTML, turning a static-looking page into an interactive one. Heavy hydration is a common cause of pages that look ready but respond slowly to the first click.
Is SSG only for small sites?
No, but very large sites usually combine SSG with incremental regeneration or on-demand rendering so they don't rebuild every page on every change.
Conclusion
CSR, SSR, and SSG aren't competing philosophies — they're tools for different kinds of pages. Use SSG where content is shared and stable, SSR where it's fresh or personal, and CSR where users are logged in and staying a while. Modern frameworks make it practical to mix them in a single project, so the best architecture is usually a deliberate combination rather than a single choice applied everywhere.
Not Sure Which Rendering Strategy Fits Your Site?
At WebSeoDynamics, we plan and build websites that use the right rendering approach for every page — fast for visitors, simple to run, and easy to grow.
Get a Free Consultation Today