SSR: Server-Side Rendering
Server-Side Rendering (SSR) creates the page's HTML on the server, then sends that finished HTML to the browser.
What you will learn
- How a server prepares HTML before sending it
- Why SSR can improve first content and search visibility
- How SSR and CSR can be combined
How SSR works
- The user requests a page.
- The server gathers the data and creates HTML.
- The server sends the completed HTML.
- The browser can display the content before optional scripts enhance it.
Strengths and trade-offs
- The first content can appear without waiting for a client-side data request.
- Search engines and assistive technology can receive meaningful HTML earlier.
- The server does more work for each request and may need caching.
- Interactive behavior may still need client-side JavaScript after the initial render.
Choosing SSR or CSR
Content pages that need a fast first view often benefit from SSR. Private dashboards and highly interactive screens may use CSR. Many frameworks combine both, so choose based on the data, interaction, and performance needs rather than treating either approach as universally better.