Full answer
A good answer follows the order and mentions where time goes and where caches skip steps.
- Input handling. The browser decides whether the text is a search or a URL, adds the scheme, and checks HSTS, which can force
https. A service worker or the HTTP cache may answer the request without the network. - DNS. The host name is resolved through the browser cache, the operating system cache and then a resolver. This can cost tens of milliseconds, and
dns-prefetchorpreconnectcan start it early. - Connection. For HTTP/1.1 and HTTP/2 the client opens TCP, then TLS. HTTP/3 uses QUIC over UDP, which merges the connection and encryption steps. Reused connections skip all of this.
- Request and response. The browser sends the request with cookies and cache validators. The server may redirect, which costs another round trip. The first byte time (TTFB) depends on the server, the CDN and the distance.
- Parsing. The HTML parser starts while the response is streaming. It finds CSS, scripts, images and fonts, and a preload scanner starts those downloads early.
- Rendering path. The DOM and CSSOM make the render tree, then layout, paint and compositing. The first paint can happen before the page has finished loading.
- JavaScript. Scripts download, compile and run. A client-rendered app builds its UI now. A server-rendered page needs hydration to attach event handlers.
- Interactive. The page is useful when the main thread is free enough to respond. Later work such as lazy images and analytics follows.
Useful remarks: a CDN reduces the distance, HTTP caching removes requests, compression reduces bytes, and streaming HTML allows early work. The back and forward buttons may skip nearly all of this when the page is restored from the back-forward cache.
The details differ by browser and by version. State the model, and say which steps you would measure with the Network and Performance panels.
Key points
- Follow the order: caches and HSTS, DNS, connection and TLS, request, parse, render, run scripts.
- Name the cost of each step and the shortcut that skips it.
- HTTP/3 uses QUIC and combines connection setup and encryption.
- Parsing and fetching overlap because of streaming and the preload scanner.
- Hydration is the step that makes server HTML interactive.
Common mistakes
- Stopping at 'DNS, then the server sends HTML'.
- Forgetting caches, redirects and connection reuse.
- Describing everything as sequential when parsing and downloading overlap.
- Saying that HTTP/3 runs on TCP.
Follow-ups
- Which steps does a CDN improve and which does it not?
- How does a service worker change this sequence?
- Where does hydration fit, and what can go wrong there?
Tips
- Give a one sentence cost for each step to show that you think in latency.
- Finish with the three metrics that these steps map to: TTFB, LCP and INP.