What happens from the time the URL is entered until the page loads?

What happens from the time the URL is entered until the page loads?

First, we need to resolve the URL to the corresponding IP address through DNS (Domain Name Resolution System). Then establish a TCP network connection with the server determined by this IP address, and then we throw our HTTP request to the server. After the server processes our request, it puts the target data in the HTTP response and returns it to the client. The browser that gets the response data can start a rendering process. After rendering, the page is presented to the user, and is always waiting to respond to the user's operation

  • DNS resolution.
  • TCP connection.
  • HTTP request thrown.
  • The server processes the request, and the HTTP response is returned.
  • The browser gets the response data, parses the response content, and displays the parsed results to the user.

illustrate:

  1. Computers on the Internet can only locate a machine through IP.

  2. TCP connection: After knowing the IP, start a three-way handshake to establish communication. sync, sync+ack, ack.
    The core of the three-way handshake: Make sure that both parties can send and receive messages normally. (Why three times? Because three times is enough to know whether the two parties in the communication can send and receive messages normally)insert image description here

Guess you like

Origin blog.csdn.net/Kate_sicheng/article/details/126240141