What is SSR?

There are three ways to get HTML to a visitor's browser.

SPA — the browser builds it

The server sends a mostly empty HTML file, and JavaScript builds the page in the browser. Once loaded it's fast, but visitors see a blank page until all the JavaScript downloads and runs. Link previews and search engines see nothing either.

Prerendering — build time

When you deploy, the build process runs your code once and generates a real HTML file for each page. Link previews work, search engines see content immediately. But it only works for pages you know about in advance — a homepage, about page, projects page.

SSR — the server builds it per request

Server-side rendering builds HTML on the server every time someone visits. The visitor gets a fully-built page, just like prerendering — but the server builds it fresh each time, using the latest data from the database.

SSR is essential for pages like /forms/5 — a form that was created after you deployed. You can't prerender it because the data didn't exist at deploy time. SSR builds the page on demand.

ApproachWhen HTML is builtGood for
SPAIn the browserInteractive apps, dashboards
PrerenderingAt deploy timeStatic pages (portfolio, blog)
SSROn every requestDynamic pages (forms, profiles)

Most web apps use SSR as the default — it handles both static and dynamic pages, with fresh data on every request.