Frontend Developer Interview Question

How do you choose between static generation, server rendering and client rendering for a given page?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

Choose by how personal and how fresh the content is. Static generation for content that is the same for everyone, since it serves straight off a CDN. Server rendering when the page depends on the request, such as a logged in dashboard, and you still need fast first paint or crawlability. Client rendering for interactive parts behind auth where first paint is not a business metric. Most real apps mix all three per route.

Why interviewers ask this

This is an architecture judgment question wearing a technical hat. The interviewer wants a decision framework rather than allegiance to whichever framework you last used, plus awareness of the costs: cache invalidation for static pages, server capacity and time to first byte for server rendering, and hydration cost for client heavy pages. It usually leads into streaming, caching and how you keep server rendered pages fast under load.

How to structure your answer

  • Give the two axes: personalization and freshness.
  • Match each strategy to a concrete page type.
  • Name the cost of each, not just the benefit.
  • Say that the decision is per route, not per app.

Example answer

Spoken example, first person

I decide per route, using two questions: is this the same for every user, and how stale can it be. Marketing pages, docs, anything crawlable and shared, that is static, revalidated on a schedule or on publish, so it is served from the edge and there is nothing to be slow. A logged in dashboard is server rendered, because it depends on the request and I want the first paint to contain real data rather than a spinner shaped skeleton. Deep interactive surfaces behind auth, like a drag and drop editor, I am happy to render on the client since nobody is measuring its LCP. The part people underestimate is the cost side. Static means owning invalidation, and I have shipped a stale price before. Server rendering means my time to first byte is now my database's problem, so it needs caching and a timeout budget. So I usually end up with static shells, server rendered data sections streamed in, and client interactivity only where it earns its bundle.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How does streaming change the tradeoff for server rendered pages?
  • How would you handle invalidation for a statically generated product page?
  • What is the cost of hydration, and how do you reduce it?

Related frontend developer questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot