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
Whose product is 5G private network? A new report...
After nearly a decade of deployment in the cloud ...
Recently, the Pudong New Area's "Governm...
Simply put, demonstration and use are two differe...
Those who are interested in UK VPS can pay attent...
[[404070]] Hello everyone, I am IT sharer, also k...
[[269430]] Is edge computing the first new trend ...
So is 5G really that important? Is 4G no longer a...
From entertainment sites to online banking sites,...
As an important direction for the evolution and u...
Connecting more and more data, applications and c...
Visible light communication is a technology that ...
With the explosive development of the Internet, t...
Will the "Warring States Period" patter...