Frontend Interview Questions

SSR vs SSG vs CSR vs ISR: Rendering Strategies

Compare CSR, SSR, SSG, and ISR. When would you pick each?

Why Interviewers Ask This

Modern frontend interviews (esp. Next.js / Remix / Nuxt shops) probe this — answers that only know CSR fail.

How to Answer

  1. 1

    CSR (client-side): HTML is a shell, JS fetches data and renders. Pro: cheap hosting, rich interactivity. Con: slow TTI, bad SEO.

  2. 2

    SSR (server-side): server renders HTML per request with data. Pro: fast first paint, SEO. Con: server cost, TTFB depends on data fetch.

  3. 3

    SSG (static): HTML generated at build time. Pro: CDN-cacheable, fastest. Con: stale data, slow builds for 100k pages.

  4. 4

    ISR (incremental): SSG + revalidate on demand or after N seconds. Sweet spot for blogs, product pages with occasional updates.

  5. 5

    Modern frameworks mix them: Next.js App Router lets you choose per route. "Islands" architectures (Astro) go static by default, hydrate only interactive parts.

Sample Answer

I start with the content type. Marketing pages / blog: SSG. Personalized dashboards: CSR or SSR with per-user cache. Product pages with occasional price updates: ISR with 60s revalidate. Highly dynamic feeds: SSR with edge caching. The classic mistake is SSR-ing everything because you heard it's good for SEO — your server and TTFB both suffer. The question to ask is "how fresh must this be, per user": SSG if never, ISR if stale-ok, SSR if per-request, CSR if only after login. Next.js App Router lets me mix at the route level, so the final site is usually a patchwork of strategies tuned to each page.

Pro Tips

  • Measure TTFB and LCP — they map directly to SSR vs SSG trade-offs.

  • Streaming SSR (React Server Components) is eroding the SSR-slow-TTFB downside.

  • HireMe AI (即答侠) gives a decision tree by content type — interviewers like structured answers here.

Frequently Asked Questions

Is SSR always better for SEO?

Not always. Google crawls JS well now, but SSR gives more reliable indexing and better LCP. Bing and social previews still prefer SSR/SSG.

What's "hydration" and why does it matter?

Hydration = JS takes over server-rendered HTML and attaches event handlers. Large hydration payloads = big TTI, which is why RSC and islands aim to reduce it.

Worried About Going Blank in Your Interview?

HireMe AI listens to your interview in real-time, detects questions, and generates instant answer suggestions — so you never freeze up again.

Try HireMe AI Free