What exactly happens when you browse a website in your browser?

Posted: October 29, 2015 in Windows
  1. Your browser, if it doesn’t already know, will ask your OS’s DNS system what the address (IP address) of the host (“www.google.com,” for example) is. If your OS doesn’t know, it will query third-party DNS servers (those of your ISP, for example).
  2. Once an address is obtained, your web browser establishes a TCP/IP socket connection, typically on TCP port 80, with the web server at the IP address it resolved the host name to.
  3. Once your browser has established this connection, it sends an HTTP GET request to the web server for whatever resource was requested in your URL. For example, http://www.google.com/would mean you’d send a ‘/’ request to whatever web server is at http://www.google.com.
  4. The web server will then, typically, respond to the request with an HTTP response, typically containing HTML. Your web browser downloads this response.
  5. Your web browser renders the HTML. It may need to send additional requests for any scripts, stylesheets, images, or other resources linked to in the HTML.

Leave a comment