Compare CSR, SSR, SSG, and ISR. When would you pick each?
Modern frontend interviews (esp. Next.js / Remix / Nuxt shops) probe this — answers that only know CSR fail.
CSR (client-side): HTML is a shell, JS fetches data and renders. Pro: cheap hosting, rich interactivity. Con: slow TTI, bad SEO.
SSR (server-side): server renders HTML per request with data. Pro: fast first paint, SEO. Con: server cost, TTFB depends on data fetch.
SSG (static): HTML generated at build time. Pro: CDN-cacheable, fastest. Con: stale data, slow builds for 100k pages.
ISR (incremental): SSG + revalidate on demand or after N seconds. Sweet spot for blogs, product pages with occasional updates.
Modern frameworks mix them: Next.js App Router lets you choose per route. "Islands" architectures (Astro) go static by default, hydrate only interactive parts.
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.
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.
Not always. Google crawls JS well now, but SSR gives more reliable indexing and better LCP. Bing and social previews still prefer SSR/SSG.
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.
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