As asked
Walk me through every step that happens between you typing a URL and pixels appearing on screen. Go as deep as you can.
Sample answer outline
Cover the layers: input handling and autocomplete in the address bar; DNS resolution (local cache, OS resolver, recursive resolvers); TCP + TLS handshake; HTTP request; server-side processing (which the candidate can stay shallow on if frontend-only); response received and parsed; HTML parsing builds the DOM; CSS parsing builds the CSSOM; JS execution may block parsing; render tree built; layout (reflow) computes geometry; paint produces pixels; composite combines layers on the GPU. Modern additions: HTTP/3, Service Worker interception, Early Hints, streaming SSR, hydration.
Expect these follow-ups
- Where in this flow does a Service Worker fit in?
- Which step is usually the biggest LCP contributor and how do you measure it?
- What changes if the page is served by a Next.js App Router with PPR?