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
[[441504]] 5G remote ultrasonic robot diagnostic ...
[[406693]] The Linkerd 2.10 Chinese manual is bei...
DogYun also officially released the promotional a...
For most of the front-end developers interviewed,...
5G messaging is planned and built based on the GS...
NFV and SDN are popular technologies that have em...
ColoCrossing Easter promotion has started, with 5...
AkkoCloud seems to be a newly established Chinese...
Since the Ministry of Industry and Information Te...
Recently, the three major operators have successi...
What is certain is that operators will continue t...
Recently, user Mr. Wang revealed to a reporter fr...
Brocade today announced the expansion of the Broc...
HTTP (Hypertext Transfer Protocol) methods, also ...