Sunday, May 20, 2012

Networking- What happens after you type a URL into a browser

One of the networking related question I love to ask during interview.

Explain what happens, step by step, after you type a URL into a browser.  Use as much details as possible.

1. Browser contacts the DNS server to find the IP address of the URL.
2. DNS server returns the IP address of the site. If your DNS does not know the IP, it will send the request to next forwarder DNS.
3. Browser opens a TCP connection to the web server at port 80. If its an HTTPS URL then it goes to port 443
4. Browser fetches the html code of the page requested.
5. Browser renders the HTML in the display window.
6. Browser terminates the connection when window is closed.

No comments: