Explain CSR, SSR, SSG, ISR, streaming and islands. How do you choose a rendering strategy?
Client-side rendering (CSR / SPA)
The server sends a nearly empty HTML shell plus a JavaScript bundle; the browser renders everything. Simple hosting and fast navigation after load, but slow first paint on weak devices and poor for SEO without extra work.
Server-side rendering (SSR)
HTML is rendered on each request, then hydrated. Fast first contentful paint and SEO-friendly, but it needs a server, adds time to first byte, and the page is not interactive until the JavaScript has loaded and hydrated.
Static site generation (SSG)
HTML is rendered at build time and served from a CDN. Fastest and cheapest; content is only as fresh as the last build.
Incremental static regeneration (ISR) / stale-while-revalidate
Static pages that are regenerated in the background after a time or on demand. Fresh enough content with CDN speed (Next.js revalidate, Nuxt swr route rules).
Streaming SSR
The server sends HTML in chunks: the shell first, slower parts later as their data resolves (React Suspense boundaries, Vue/Nuxt streaming). It improves time to first byte and LCP.
Islands and partial hydration
Most of the page is static HTML; only interactive "islands" ship JavaScript and hydrate (Astro, Fresh). React Server Components reach a similar goal inside React: server-only components send no JavaScript.
Choosing
- Marketing, docs, blog: SSG or islands.
- E-commerce product and listing pages: SSR or ISR with streaming.
- Logged-in dashboards and internal tools: CSR is fine.
- Mix per route in meta-frameworks (Next.js, Nuxt, Remix/React Router, SvelteKit, Astro).
Example
/and/blog/*: SSG, served straight from the CDN./products/*: ISR (revalidate every 10 minutes) or streaming SSR for prices and stock./account/*: SSR with authentication, never cached publicly./dashboard/*: CSR, loaded after login.
Follow-up questions interviewers ask
Try answering each one before you open it.
What does TTFB vs FCP vs TTI tell you about these strategies?
CSR has a fast TTFB but slow FCP (nothing to show until JavaScript runs). SSR improves FCP and LCP but can worsen TTFB (server work) and leaves a gap until hydration (interactivity). SSG gives the best TTFB and FCP. Streaming reduces SSR's TTFB penalty. Measure INP too: heavy hydration can block early interactions.