The paper
HTTP /2 is the second version of the Hypertext Transfer Protocol, originally named HTTP2.0. It is based on the SPDY protocol and maintains a high degree of compatibility in request methods, status codes and even URIs and most HTTP header fields
The tools for optimizing pages through HTTP2.0 include
- Data compression for HTTP header fields (HPACK)
- HTTP /2 Server Push
- Request pipelining
- Allows setting request priority
- Fixed issues not fixed since HTTP /1.0 (such as queue head blocking)
- Data transmission is multiplexed
- Binary is used to package and transmit data
2.0 supports existing HTTP application scenarios, including desktop browser and mobile device browser, network API, different specifications of web server and forward proxy, reverse proxy server software, firewall, CDN, etc.
Http2.0 compared to HTTP1.1
- Http2.0 is compatible forward, but with new features you can get better speeds
- Http2.0 takes a new approach to encoding and transferring client and server data
Http2.0 vs. SPDY
- Http2.0 uses a custom Huffmann-based compression algorithm, while SPDY uses a dynamic stream compression algorithm
- Http2.0 disables many encrypted packets to secure tlS-BASED connections forward
Browser compatibility
Queue Head blocking
In computer networks, performance limitation occurs when the first packet is blocked and the entire packet is blocked.Copy the code
SPDY
The Google-led alternative to HTTP, which uses the TCP channel, focuses on reducing latencyCopy the code
Server push
The server provides resources to the browser without the browser asking for themCopy the code
Request pipelining
A technique to batch submit multiple HTTP requests without waiting for a response from the server. The load time of HTML pages can be dynamically improved in a high latency connection environment. The server must recover requests in the order requested by the client, so the connection is still first-in, first-out, which is easy to cause the problem of queue blocking, and HTTP2.0 may fill multiple HTTP requests in a TCP packet to solve this problem.
Multiplexing (multiplexing)
Usually refers to the process and technique of transmitting multiple signals or data streams over a single channel. Multiplexing enables the consolidation and transmission of multiple low-speed channels into a single high-speed channel.
References
-
http2.0
-
caniuse