Skip to content
ADArjun Dev13d ago

What actually happens when you type a URL into the browser and press Enter?

This is apparently the classic interview question and I realize my answer is embarrassingly vague. Can someone give the answer that would actually satisfy an interviewer?
49
1 answers931 views

1 Answer

Accepted answer

KMKaran Mehta5.3K XP12d ago
The interview-grade version, in order: 1. DNS — browser asks 'what IP is this domain?' Checks its cache, then the OS, then a resolver, which walks root → TLD → authoritative nameservers. 2. TCP — browser opens a connection to that IP on port 443 (three-way handshake: SYN, SYN-ACK, ACK). 3. TLS — certificates are exchanged and verified, encryption keys negotiated. The padlock. 4. HTTP — browser sends `GET /`, the server (often via load balancer → app server → database) builds and returns HTML. 5. Rendering — browser parses HTML, discovers CSS/JS/images, fetches those in parallel, builds the DOM + CSSOM, runs JS, paints pixels. Senior-level bonus: mention caching at every layer — DNS cache, CDN, browser cache — and that HTTP/2 multiplexes those parallel fetches over one connection.
21

Know the answer?

Join Nobink to answer, vote and build your reputation.