This article is reprinted from the WeChat public account "JS Daily Question", the author is Huihui. Please contact the JS Daily Question public account to reprint this article. 1. Simple analysisA simple analysis shows that the following actions occur from entering the URL to pressing Enter:
2. Detailed AnalysisURL Parsing First, determine whether you entered a valid URL or a keyword to be searched, and perform corresponding operations based on the content you entered The structure of a URL is as follows: DNS LookupI have discussed DNS queries in previous articles, so I will not discuss them here. The entire query process is shown in the following figure: Finally, the target server IP address corresponding to the domain name was obtained TCP ConnectionIn the previous article, we learned that TCP is a connection-oriented transport layer protocol After determining the IP address of the target server, a three-way handshake is performed to establish a TCP connection. The process is as follows: Sending HTTP RequestOnce the TCP connection is established, communication can be carried out on this basis, and the browser sends an HTTP request to the target server. The request includes:
Responding to a requestWhen the server receives the browser's request, it performs logical operations and returns an HTTP response message after processing is complete, including:
After the server responds, since HTTP now starts a long keep-alive connection by default, when the page is closed, the TCP connection will be disconnected after four waves. Page RenderingWhen the browser receives the resource responded by the server, it will first parse the resource:
The rendering process of the page is as follows:
References https://github.com/febobo/web-interview/issues/141 https://zhuanlan.zhihu.com/p/80551769 |
<<: UL launches Wi-Fi 6E testing service in Europe
>>: Two ways of TCP retransmission
[[248346]] With China Telecom announcing its oper...
As we all know, in the 5G era, we are greeted by ...
This article is reproduced from the WeChat public...
DogYun is a Chinese hosting company established i...
Today I want to talk to you about a technical top...
A router is a core element of internet connectivi...
Computationally speaking, the big data analytics ...
HostXen launched its first promotion after the Lu...
When it comes to comparing SD-WAN vs. VPN service...
On January 20, the State Council Information Offi...
A few days ago, we shared CMIVPS's regular pr...
On October 15, the "2021 Financial Cybersecu...
At the beginning of the new year, many friends be...
Under the wave of digital transformation, enterpr...
According to CAICT's forecast, by 2025, 5G wi...