Rendering
Server-Side Rendering (SSR)
Also: SSR
Generating HTML on the server for every request, then sending it to the browser.
Definition
In SSR, the framework runs on each incoming request, fetches data, generates HTML, and sends it back. Crawler-visible HTML is generated fresh per request. TTFB depends on origin response time, typically 200ms to 1.5s. Examples: Remix everywhere, Next.js with force-dynamic, Express + EJS, classic PHP/Rails apps.
When to use
- Personalized or auth-gated content that changes per user and cannot be safely cached.
- Pages that depend on data with sub-minute freshness (live pricing, inventory, dashboards).
- Smaller sites where cold-cache TTFB of 200-800 ms is acceptable and rebuild cycles for SSG are too slow.
- Pages where the URL contains the full personalization state (`?user=...`) and a CDN edge cache would be ineffective anyway.
Common pitfalls
- Origin overload during crawl spikes — SSR scales linearly with traffic, unlike SSG/CDN delivery.
- Hidden client-side hydration that adds the real content after server HTML (effective CSR, not SSR).
- Mixing `force-dynamic` and `force-static` in the same template, producing inconsistent crawler experiences.
- Believing SSR alone solves JS SEO — without disciplined Server Components, much of the work still happens in the browser.
Verification
- curl -I https://your-site.com/route — confirm `cache-control` is appropriate; 100% miss rate at the CDN is an SSR red flag for static-eligible templates.
- Crawler analytics — average response time for Googlebot on SSR routes should stay below 800 ms; sustained slowdown reduces crawl rate.
- Next.js: build output shows `ƒ (Dynamic)` for SSR routes vs `○ (Static)` for SSG — verify intent matches reality.
- Compare server-rendered HTML to client-rendered DOM with browser disabled JS — text and links must match.
References
Last updated:
See also
More in Rendering
Prerendering
Generating static HTML snapshots of JavaScript-rendered routes for crawlers and (sometimes) users.
Static Site Generation (SSG)
Building every page as static HTML at build time and serving from a CDN.
Incremental Static Regeneration (ISR)
A hybrid where pages are static-served from cache but regenerated on demand or on a TTL.
Hydration
The process of attaching JavaScript event listeners to server-rendered HTML in the browser.
Need this concept applied to your stack?
Glossary entries are intentionally short. Real engineering tradeoffs need a scoping call — bring the domain, the stack, and the question.