0 day streak
7. NetworkingWhat happens when you type a URL

What happens when you type a URL

It’s the chain of steps your browser runs between you pressing Enter and a page showing up. First it turns the name into an IP address with DNS, then opens a TCP connection to that address, then runs a TLS handshake so the connection is encrypted and the server has proved who it is. Only then does it send an HTTP request; the server replies with HTML, and the browser parses it, fetches the CSS, scripts and images it references, and paints the result. It’s a favorite interview question because each step is a whole topic, and because most of the delay on a cold load is these back-and-forth round trips, not the data itself.

In this lesson: The flagship zoom object. Start at browser-to-server and click to zoom into DNS, then TCP, TLS, HTTP, the server and rendering.