HTTP is an application layer protocol based on TCP. It uses TCP to process data communication logic, and then processes application logic at the HTTP layer. HTTP 1.0 as the earliest protocol used, there are inevitably some defects, the most important one is the default does not support long connections, all connections are used up directly broken, which is very unfriendly to some connections that need to be used repeatedly. The TCP connection takes a lot of time, which makes the communication speed slow. Long connections are supported by default starting with HTTP1.1, which has the greatest optimization of the previous version. However, if an application has a lot of graphics for the same address, each request must generate a new connection. The browser has a limit on the number of connections that can point to the same address (chrome last version is 6). In this case, HTTP1.1 can also be used to avoid cross-domain configuration, which is also the reason why some sites can be configured to avoid cross-domain. To circumvent the connection limit, HTTP2.0 provides a multiplexing scheme based on this, where multiple HTTP requests from the same application can share a connection. It also uses a specially developed head compression algorithm to save bandwidth and speed
The following figure shows the maximum number of connections under the same domain name supported by major browsers