HTTP

How does HTTP work?

The best resource I found is this Quora answer to How does HTTP work?. In summary, when you input a URL into your browser's location bar and press enter, this is typically and loosely what happens:

  • Using DNS, the URL is resolved into an IP address.

  • A TCP connection is established with the web server answering at that IP address. Alternatively, a TLS-encrypted TCP connection is established if using HTTPS.

  • HTTP messages are exchanged, the browser sends requests and the server sends back responses. It starts with a GET request for the document referenced by the URL but many more request/response pairs are exchanged to load all of the different resources that make up a particular web page.

References

How do browsers render web pages?

Exercises