Supplement: What happened from the input url to the page display?

Hello, I am Yuechuang.

From the user's point of view, thanks to the unremitting efforts of major browser manufacturers, all of this seems to be taken for granted. Enter an address, visit the Internet, and display a colorful interface where you can browse videos and read articles. , Even playing games.

But from the developer's point of view, this is a big problem looking at the overall situation, and each step is a topic that can be extended. The optimization of the project is inseparable from all aspects here, and it has the value of in-depth understanding. We can start from an overview and see what is happening behind the scenes.

1. The steps are roughly as follows

  1. Inquire IP from DNS (Domain Name System) according to the address entered in the address bar
  2. Initiate a TCP connection to the server via IP
  3. Initiate a request to the server
  4. The server returns the requested content
  5. The browser starts to parse the rendered page and display it
  6. Close the connection

clipboard.png


2. DNS

First we need to know what DNS is

The Domain Name System (English: Domain Name System, abbreviation: DNS) is a service of the Internet. As a distributed database that maps domain names and IP addresses to each other, it can make it easier for people to access the Internet. DNS uses TCP and UDP port 53. Currently, for each level of domain

Guess you like

Origin blog.csdn.net/qq_33254766/article/details/109126523