EasyRendering Strategies📖 Theory Question

When would you choose SSR over SSG for a page?

💡

Hint

SSR makes sense when content is personalized, real-time, or cannot be known at build time

Full Answer

Choose SSR over SSG when:

  • Content is per-user — a dashboard, cart, or profile page. SSG can't encode user-specific data at build time.
  • Data changes very frequently — live scores, stock prices, breaking news. ISR revalidation windows would always show stale content.
  • SEO matters AND content is real-time — SSR delivers fresh HTML to crawlers without client-side rendering delay.
  • You need request-time context — cookies, headers, geolocation, A/B test assignments available only at request time.

Trade-offs of choosing SSR:

  • Higher server cost — every request spins up rendering work.
  • Higher TTFB vs CDN-cached static files.
  • Must manage server scaling and cold starts.
💡 A common pattern: SSG the marketing/blog pages, SSR the dashboard, and CSR the deeply interactive editor.

More Rendering Strategies Questions

EasyWhat is the difference between CSR, SSR, SSG, and ISR?EasyWhat is Streaming SSR and how does it improve perceived performance?EasyWhat is hydration and what causes hydration mismatches?MediumWhat is partial hydration / islands architecture and why does it matter?

Practice this in a timed sprint →

5 free questions, no signup required

⚡ Start Sprint