Wednesday 15 January 2014

How your web browser requests and receives a resource from a Web Server?

Your Web browser, in fact any web client, goes through the following cycle when it communicates with a Web server:

  1. Obtain an IP address from the IP/domain name of the site (the site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).
  2. Open an IP socket connection to that IP address.
  3. Write an HTTP data stream through that socket.
  4. Receive an HTTP data stream back from the Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.

Click here to read more about HTTP status codes