Three-way handshake and http protocol advantages and disadvantages, TCP advantages and disadvantages
The interaction between the client and the server is divided into the application layer-Transport Layer-network layer-link layer.
The client sends data through the application layer-Transport Layer-network layer-link layer. When the data arrives at the server side, the received data is received from the link layer-network layer-Transport Layer-Application Layer in sequence.
The three-way handshake of the TCP protocol is mainly used to ensure that the data reaches the target. When the TCP sends the data packet, it carries the SYN flag, after receiving the packet, the receiving end will return a packet with the SYN/ACK mark to send the confirmation information. Finally, the sender will return an ACK mark of the packet, which indicates that the three handshakes have ended.
XSS cross-site scripting (XSS) attacks are carried out by running an illegal http or javascript attack on a website with a security vulnerability. If the httponly attribute is set in the cookie, javaScript scripts cannot read cookie information, which effectively prevents XSS attacks.
Disadvantages of the http protocol: the communication parties do not know each other and are prone to impersonating them. The communication process uses plain text and is easy to be eavesdropped by a third party. The packet integrity cannot be determined and may be tampered;
The http protocol runs at the application layer. https is equivalent to an SSL protocol shell for http. With SSL, communication will be protected by http-SSL-TCP; SSL provides encryption-Authentication-integrity.
One server can build multiple web sites, mainly using the functions of virtual hosts. From the physical perspective, although there is only one server, but the virtual host function is mainly used, it can be assumed that there are multiple servers.