Demo Example

Server-side rendered demo page, fetching data from backend API

API Response DataSSR
rettrue
msgnull
statusCode0
dataHello World

What is SSR?

SSR (Server-Side Rendering) generates HTML on the server before sending it to the browser. Users see complete content on first load, which benefits SEO and initial page load speed.

How to Use

  1. The page automatically calls the backend API on the server
  2. HTML includes pre-rendered content, no client request needed
  3. View the data returned by the API
  4. Ideal for pages that need SEO optimization

SSR Use Cases

SEO Optimization

Search engines can crawl page content directly, improving rankings

First Paint Speed

Server returns complete HTML, no need to wait for JS loading

Dynamic Metadata

Generate dynamic title and description based on API data

FAQ

Q: What's the difference between SSR and CSR?

A: SSR generates HTML on the server; CSR renders content after JS loads in the browser. SSR is faster for first paint and SEO-friendly.

Q: Should all pages use SSR?

A: No. Pages needing SEO (tool pages, articles) suit SSR; interactive pages (editors) suit CSR.