http three-way handshake fourth wave

http: hypertext transfer protocol, to transmit information, the client sends between the client and server html, css to the server, the server returns the source code to the client;
https: is a more secure transport protocols, add a layer of password on the agreement, can not be easily hacked, more secure. Used for payment page, government agencies page, page Public Security Bureau, Bank ......;
 
When the input url in the browser sends a request to the server, the browser have done?
http transaction: passed from the browser to the server, which in return content to the browser, which is a complete process is called a transaction of http.
1, http request phase:
1) the browser sends the url to the DNS server;
2) DNS server to find the corresponding server according to the IP;
3) The server receives the request, the client and server connection has been generated;
 
2, http response phase:
4) After the server receives the request, according to the path, to find the corresponding item;
5) After the server is found, the server immediately in response to some of the information in the response header transmitted via http to the client, while the data collation;
6) sorting out the data sent to the client via http, until the client have been received;
 
3, browser rendering stage:
7) browser to get the transmission from the server over the data file;
8) to traverse HTML, DOM tree is formed;
9) parsing the code from top to bottom, CSS tree form;
10) DOM tree and CSS tree reconstitute render tree;
11) depicts the browser and rendering;
 
http three-way handshake and fourth wave:
Browser to the service, service before transmitting data, there are three-way handshake after handshake succeeds, it can transmit data
1, the browser need to send the SYN code, and the server requests the client to establish a connection;
2, the server receives the SYN code, and then sent to the customer terminal SYN + ACK code, I can establish a connection;
3, the client receives the ACK code, verify that the ACK is correct, if correct, then the client and server to establish a data connection; both the data transmission channel will be open;
 
Four wave:
1, when the client is no data to be transmitted, the code tells the server sends a FIN, I send finished;
2, when the server received, ACK code tells the client, you can tell the client data channel closed;
3. When the server has been sent, it will send a FIN code that tells the browser, data transmission is completed;
4, when the client received, transmitting the same ACK code tells the server that data has been received, you can turn off;
Three-way handshake and benefits of four wave: to ensure the security and integrity of data
 
Response header: the server tells the browser data length, and data length of the same browser response header length data, indicating the data has been received.

Guess you like

Origin www.cnblogs.com/bky1234/p/11286635.html