User requesting a web page

When a user goes to the browser and types a URL, what exactly is happening?

  1. The browser tries to look up the IP address of the domain name in the URL by getting it from the DNS Server. Think of DNS as a directory mapping the domain name to the IP Address.

 

  1. Once the browser has the IP Address, it sends a HTTP request to that IP Address on port 80. If the URL is secure (HTTPS), then the request is sent to port 443. A simple HTTP request that is sent in plain text format looks like this:  GET /hello.html HTTP/1.1.
  2. The request also contains headers that are shared to pass additional information about the request, such as authentication information, cookies, or the type of the browser making the request.
  3. The request ...

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.