TechnicalMedium HTTP & REST APIs
What happens when you type a URL into the browser and press Enter?
Asked for Frontend Developer, Backend Developer, Full-Stack Developer
Why they ask this: An open-ended classic that shows how broad your understanding of the web is.
Answer
- URL parsing: the browser works out the scheme (
https), host and path. - DNS lookup: the hostname is resolved to an IP address (browser cache → OS cache → resolver → root, TLD and authoritative name servers).
- TCP connection to the server on port 443 (a three-way handshake). HTTP/3 uses QUIC over UDP instead.
- TLS handshake: the server proves its identity with a certificate and both sides agree on encryption keys.
- HTTP request: for example
GET /jobswith headers and cookies. - Server side: a load balancer or web server (Nginx) passes the request to the app (Laravel or Node), which may query the database and returns a response, often via a CDN cache.
- Rendering: the browser parses HTML into the DOM and CSS into the CSSOM, runs JavaScript, builds the render tree, then does layout and paint.
- Extra requests load images, scripts and fonts, and caching headers decide what is reused next time.
Go deeper on whichever part matches the role you are applying for.
Can you explain this in your own words?