Server-side rendering (SSR) is a technique where the server builds the full HTML of a page, usually at request time, and sends it to the browser, as opposed to sending an empty shell that JavaScript fills in.
Why it matters
SSR shows content sooner, helps crawlers and link previews read the page, and works better on slow devices. The trade-offs are server load, higher time to first byte if rendering is slow, and the need for hydration to make the page interactive. Caching rendered output at a CDN reduces the cost.
Example
Compare what each approach returns for the same page:
<!-- Client-rendered -->
<div id="root"></div>
<!-- Server-rendered -->
<div id="root"><h1>Blue Kettle</h1><p>$29</p></div>
The second displays text even if the script fails or is slow.
Common mistakes
- Assuming SSR is always faster. Slow data fetching on the server delays everything.
- Using browser-only objects like
windowin code that also runs on the server. - Caching personalized pages publicly and leaking one user's content to others.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.