What happens when you type a URL into the browser?
✅ Answer:
When a URL is entered, the browser first checks its cache and then performs DNS resolution to translate the domain name into an IP address.
Next, the browser establishes a TCP connection with the server, followed by a TLS handshake if the connection is HTTPS. The browser then sends an HTTP request to the server.
The server processes the request and returns an HTTP response. Finally, the browser parses the HTML, constructs the DOM and CSSOM, executes JavaScript if present, and renders the page to the screen.