From URL to bytes · core
What happens when you type a URL and press Enter
The browser parses the URL, checks caches (HSTS, service worker, HTTP cache), resolves DNS, opens a connection (TCP + TLS or QUIC), sends the HTTP request, follows redirects, then streams and parses the HTML into DOM and CSSOM, fetches sub-resources, and lays out and paints the page.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- URL parsing and HSTS check (upgrade http to https if the host is on the HSTS list). 2) A service worker may answer the request. 3) The HTTP cache may answer it without the network.
- DNS: browser cache, OS cache, then a recursive resolver (root -> TLD -> authoritative). Each new hostname on the page needs its own lookup.
- Connection: TCP 3-way handshake (1 round trip) then TLS 1.3 (1 more round trip), or QUIC for HTTP/3 (transport and TLS together in 1 round trip). Connections are reused.
- Request and response: method, headers, cookies; the server (or CDN edge) replies with status, headers and the body, often compressed. Redirects (301/302/307/308) repeat steps.
- Rendering: the HTML is parsed as it streams; the preload scanner fetches CSS, JS, fonts and images early; CSS builds the CSSOM; scripts run; then render tree, layout, paint, composite.
- On mobile networks round-trip time (RTT) dominates: every extra round trip (redirect, new origin, DNS) costs 50 to 300 ms.
The red pen
Common traps: mistake → fix
Mistake: "DNS happens once per page"
Fix: once per unique hostname; third-party domains each need their own lookup and connection.
Mistake: "The page renders after the whole HTML downloads"
Fix: parsing and fetching start while the HTML streams in.
Mistake: "HTTPS needs many round trips"
Fix: TLS 1.3 needs one; TLS 1.2 needed two.
Easy to hard
Questions interviewers ask, easy to hard
- What happens when you type a URL and press Enter?
- Which of these steps can be skipped on a repeat visit and why?
- Where does time go on a slow 4G connection, and what can a frontend engineer change?
- How do a CDN, HTTP/3 and 103 Early Hints change this timeline?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.