(1) Browser parsing
(2) Query cache
(3) DNS queries
The sequence is as follows, if one of the steps succeeds directly in establishing the connection section:
--Browser's own DNS
--Operating system DNS
--Local Hosts file
--Like a domain name server sending requests
(4) Establishing a connection
--TCP three-time handshake (Three-way handshaking)
--Sender: SYN (synchonize)
--Recipient: syn/ack (acknowledgement), confirming information transmission
--Sender: ACK-confirms the receiver's re-line to receive the message, the handshake ends
Accept
--1, send side: The packet labeled SYN sent to you.
--2, receiver: I get it! I got the packet you sent me! (and send a packet labeled Syn/ack)
--3, understand! (send packets marked with ACK)
The advantage of the TCP three handshake is that the sender can confirm that the recipient is still online and will not waste resources because of white hair.
(5) Sending an HTTP request
--Message header (get/index.html http/1.1)
--Method
--URL
--HTTP version
--Empty line
--Message body
Note: The 1,http is non-connected, stateless, that is, after the HTTP retransmission is complete, it will be disconnected and the last login status will not be logged on the next login.
2, about CR (carriage return, carriage return) and LF (line Feed, newline)
DOS and Windows cr/LF means the next line UNIX/Linux uses LF to indicate that the next line ofMac OS system uses CR for the next line
(6) The server sends the response
--Message header (http/1.1 OK)
--HTTP version
--Response status code
--Status Code information
--Empty line (CR+LF)
--Message body
(7) The client receives the page
(8) Parsing HTML
--Building the DOM tree
--Download Resources
--CSS-building Csssom Tree
--js-wait for download and parse after execution
(9) Building a render tree
Invisible elements are not rendered according to Dom and Csssom tree rendering
(10) Browser layout rendering
--layout-according to the rendering book layout
--draw-draw each point on the screen
After entering a URL, what happens??