Skip to content
RED SAGSkills
easyFull Stack Developer interview question

Explain client-side rendering, server-side rendering and static site generation. When would you use each?

What the interviewer wants to hear

  • CSR renders in the browser after JavaScript loads
  • SSR renders HTML on the server for each request
  • SSG builds HTML at build time and serves it from a CDN
  • Trade-offs in SEO, speed, freshness and server cost
  • Frameworks like Next.js mix these per route

Model answer

With client-side rendering, the server sends a mostly empty HTML page and JavaScript builds the UI in the browser. It is fine for dashboards behind a login where SEO does not matter, but the first load can be slow. With server-side rendering, the server builds HTML for each request, so the user and search engines see content quickly and the data is always fresh, but each request costs server time. Static site generation builds pages at build time and serves them from a CDN, which is the fastest and cheapest, and great for blogs, docs and marketing pages, but data can be stale until you rebuild or revalidate. In Next.js I can mix them: static pages for marketing, revalidated static pages for product listings, dynamic server rendering for personalized pages, and client components only where I need interactivity.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Full Stack Developer questions