Skip to the page

How the browser draws the page · core

What happens when you type a URL

The browser resolves DNS, opens a TCP (or QUIC) connection with TLS, sends an HTTP request, then parses HTML into the DOM, CSS into the CSSOM, runs scripts, and renders: style, layout, paint and composite.

The notes

What you must know

  • Network: cache checks, DNS lookup, TCP + TLS 1.3 handshake (or QUIC for HTTP/3), HTTP request and response.
  • Parsing: HTML to DOM; CSS to CSSOM. CSS is render-blocking; a classic <script> blocks the parser.
  • Render: style (match rules), layout (sizes and positions), paint (draw into layers), composite (GPU combines layers).
  • The preload scanner fetches later resources while the parser is blocked.

The red pen

Common traps: mistake → fix

  • Mistake: "the page renders after all JS loads"

    Fix: rendering can start once the DOM and CSSOM are ready; defer and async change when scripts block.

Easy to hard

Questions interviewers ask, easy to hard

  1. What happens when you type a URL and press Enter?
  2. What blocks the first render?
  3. Where do CDNs and caching help in this flow?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview