HTTP2
HTTP/2 (HTTP version 2, originally named HTTP 2.0), abbreviated as h2 (encrypted connection based on TLS/1.2 or above) or h2c (non-encrypted connection), is the second major version of the HTTP protocol, used to transmit data between web servers and clients.
HTTP/2 is the first update to HTTP since the 1999 release of the HTTP/1.1 improvement RFC, and is mainly based on the SPDY protocol.
Most mainstream browsers had supported this protocol by the end of 2015.
HTTP/2 is a network protocol and an upgrade from HTTP/1.1, released by the IETF in 2015. HTTP/2 aims to improve web performance, reduce latency, increase security, and make web applications faster, more efficient, and more reliable.

HTTP/2 Features
The following are some features and improvements of HTTP/2:
-
Multiplexing: HTTP/2 allows multiple requests and responses to be sent simultaneously, rather than processing them one by one as in HTTP/1.1. This reduces latency, improves efficiency, and increases network throughput.
-
Binary transmission: HTTP/2 uses a binary protocol, unlike the text protocol used by HTTP/1.1. A binary protocol can be parsed faster and transmit data more efficiently, reducing overhead and latency during transmission.
-
Header compression: HTTP/2 uses the HPACK algorithm to compress HTTP headers, reducing the amount of header data transmitted and thereby reducing network latency.
-
Server push: HTTP/2 supports server push, allowing the server to push resources to the client before the client requests them, improving performance.
-
Improved security: HTTP/2 uses TLS (Transport Layer Security) encryption for data transmission by default, improving security.
-
Compatibility with HTTP/1.1: HTTP/2 can coexist with HTTP/1.1; a server can support both HTTP/1.1 and HTTP/2 at the same time. If the client does not support HTTP/2, the server can fall back to HTTP/1.1.
Overall, HTTP/2 has significant improvements in performance, security, and usability, making web applications faster, more efficient, and more reliable.
It uses multiplexing for data transmission, merging multiple requests within the same TCP connection, as shown in the figure below:

HTTP/2 reduces network latency and improves the browser's page load speed:

HTTP/2 uses a binary format to transmit data, rather than the text format used by HTTP/1.1. This improves efficiency and reduces the latency of data transmission.

HTTP/2 uses header compression to reduce the size of transmitted data. This helps reduce network bandwidth usage and improve page load speed.

HTTP/2 allows the server to actively send data to the client without being requested. This helps reduce request latency and improve page load speed.
