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
In actual development, we often use 127.0.0.1 and...
It can be said that 5G and intelligent automation...
5G has three main advantages over 4G: high speed,...
With the development of mobile Internet technolog...
DMIT.io has launched a NEW YEAR promotion for 202...
5G has been popular in China for some time. The f...
TTCLOUD is a relatively new foreign hosting sales...
Development of 6G networks is gathering pace, wit...
There are four main types of routers in the netwo...
According to the "2018-2023 China Internet o...
Author | Heye Review | Chonglou With the continuo...
With the commercialization of 5G and the increase...
To some extent, 5G private network does not allow...
HostKvm was founded in 2013. It currently provide...
We know that a URL consists of the following part...