There are three ways to get HTML to a visitor's browser.
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.
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.
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.
| Approach | When HTML is built | Good for |
|---|---|---|
| SPA | In the browser | Interactive apps, dashboards |
| Prerendering | At deploy time | Static pages (portfolio, blog) |
| SSR | On every request | Dynamic pages (forms, profiles) |
Most web apps use SSR as the default — it handles both static and dynamic pages, with fresh data on every request.