The browser takes the URL and parses it

Protocol: indicates the protocol header, such as HTTP and FTP. Host: indicates the host domain name or IP address. Port: indicates the port number. Path: indicates the directory path. Query: indicates the query parameter. Fragment: hash value after #, used to locate a location.

The IP address is obtained by DNS query

  1. Browsers have caching
  2. PC local cache
  3. The host file
  4. Query information on the DNS server
    • There may be a route, there may be a cache in the route, or there may be a custom DNS resolution in the route

Establish TCP/IP communication

Communication over the Internet requires a network protocol. TCP/IP is a protocol family customized for the Internet. Therefore, the protocol of the Internet is TCP/IP. Note: TCP/IP is not a protocol, but a protocol family. It includes IP protocol, IMCP protocol, TCP protocol and so on. HTTP requests made by browsers are essentially TCP/IP requests. TCP divides HTTP long packets into short packets and establishes a connection with the server through three-way handshake for reliable transmission. Once the connection is established, the data is transferred.

Making an HTTP request

  1. After the communication between the client and server is established, the client initiates an HTTP request
  2. After receiving the HTTP request, the server processes the request and returns the processing result to the client
  3. The client receives the data returned by the server

Disable the TCP/IP connection

Four waves are required to disconnect the connection (four waves are required because it is full-duplex).

Browser processing returns the result

  1. The browser parses the HTML and generates a DOM tree

  1. The browser parses CSS rules and generates a CSS rule tree

  1. The browser generates the Render rendering tree through DOM tree and CSS rule tree structure

  1. Display the page

Complete the process