What Happens When You Type in a URL | SJB -->

This website uses cookies to ensure you get the best experience. More info...


What Happens When You Type in a URL

There is a commonly asked deceptive question in tech interviews “What happens when you type in a URL?”. It is always good to have a basic understanding of what are the background processes between the browser and the information that is transferred over the internet. This is how it can be explained in short:

We enter a URL into a web browser.
The browser checks the cache for a DNS record to look up the IP address for the domain name. It checks four caches if needed (Browser cache > OS cache > Router cache > ISP cache).
If the requested URL is not in the cache, ISP’s DNS server initiates a DNS query to find the IP address of the host's server.
The browser sends an HTTP request to the server.
The server handles the request and sends back an HTTP response.
The browser starts rendering the HTML content.
The browser sends requests for additional objects (Images, CSS, JavaScript).
Once the page load is completed, the browser sends further async requests as needed.

No comments:

Post a Comment