Engineering

What is SSR (Server-Side Rendering)?

SSR is the technique where HTML is generated on the server per request, instead of in the browser — better for SEO and first paint.

In pure SPAs (React without a framework), the browser receives empty HTML and builds everything via JS — heavy, slow, bad for SEO. SSR solves this by generating ready HTML; the browser displays immediately, then hydrates.

Next.js (App Router), Remix, Nuxt and SvelteKit do SSR by default. Trade-off: server processes more (cost); benefit: SEO and perceived speed gain a lot.

Frequently asked questions

SSR vs SSG: which to use?
SSG (static) for content that doesn't change per request (blog, marketing); SSR for per-user dynamic data (dashboard).
Does SSR cost more than SPA?
Yes, in server-side compute. But serverless (Vercel, Cloudflare) made that cost very low — worth it.