Advertisement
Intermediate Next.js, Rendering (SSR/SSG/ISR)

When would server side rendering be the better choice over static site generation or incremental static regeneration?

Short answer

Server side rendering is the right choice when a page's content must be completely up to date on every single visit and cannot tolerate any staleness, such as a live stock ticker, a personalized dashboard showing a specific user's private data, or a page whose content depends…

Save Next.js mock interview
Advertisement
AModel answer
Server side rendering is the right choice when a page's content must be completely up to date on every single visit and cannot tolerate any staleness, such as a live stock ticker, a personalized dashboard showing a specific user's private data, or a page whose content depends heavily on cookies or request headers.
// Using cache: 'no-store' forces server side rendering behavior
const res = await fetch('https://api.example.com/stock-price', { cache: 'no-store' });
Real-world example
A financial trading platform uses server side rendering for its live stock price page, ensuring every visitor always sees the current price rather than a potentially outdated cached version.
Likely follow-ups
  • Does server side rendering have a performance cost compared to static pages?
  • How do you combine server side rendering with streaming for a better experience?
Related topics