Thursday, March 24, 2011

What happens when you navigate to a URL?

Browse the net I found a really interesting article about what actually happens when you type in a URL in your browser.

How does the content of website makes its way to your browser for display?

Full Article : http://igoro.com/archive/what-really-happens-when-you-navigate-to-a-url/

In an nutshell:

1. You enter a URL into the browser

2. The browser looks up the IP address for the domain name

image

The first step in the navigation is to figure out the IP address for the visited domain.

3. The browser sends a HTTP request to the web server

image

4. The Facebook server responds with a permanent redirect

image 

5. The browser follows the redirect

image

The browser now knows that “http://www.facebook.com/” is the correct URL to go to, and so it sends out another GET request

6. The server ‘handles’ the request

image

The server will receive the GET request, process it, and send back a response.

7. The server sends back a HTML response

image

8. The browser begins rendering the HTML

Even before the browser has received the entire HTML document, it begins rendering the website:

image

9. The browser sends requests for objects embedded in HTML

image

10. The browser sends further asynchronous (AJAX) requests

image

No comments:

Post a Comment