1.

What happens when we try to connect to any website, for instance, when we try to visit www.facebook.com ?

Answer»

When we TRY to connect to any website, for instance, when we try to visit www.facebook.com the FOLLOWING steps take place:

  • The browser cache is first checked to see if the content is fresh and whether it is present in the browser cache or not. If it is present in the browser cache, then it is displayed.
  • If not present in the browser cache, the browser checks if the URL's IP address is in the cache (browser and OS), and if it is not, it asks the Operating System to perform a DNS (DOMAIN Name System) search using UDP (USER Datagram Protocol ) to obtain the URL's (Uniform Resource Locator) associated IP address from the DNS server, and then establishes a new TCP connection.
  • Three-way handshaking establishes a new TCP connection between the browser and the server.
  • The TCP connection is used to send an HTTP request to the server.
  • The web servers on the Servers process HTTP requests and respond with HTTP responses.
  • The browser decodes the server's HTTP answer and decides whether to close or reuse the TCP connection for future requests.
  • If the data in the RESPONSE is cacheable, browsers will save it.
  • The response is decoded by the browser.


Discussion

No Comment Found