How HTTP/2 Works ?
HTTP/2 focuses on optimizing the flow of content between clients and servers. It’s fully backwards-compatible with HTTP/1.1, meaning websites will work the same with either protocol.
When a user connects to a server, their browser negotiates an HTTP session with the server. The type of session created will vary depending on the features supported by the browser and the server. If both parties support HTTP/2, the server uses the HTTP/2 protocol to shape and optimize traffic before it passes through the network to the user.
HTTP/2 does not modify the application semantics of HTTP in any way. All the core concepts, such as HTTP methods, status codes, URIs, and header fields, remain in place. Instead, HTTP/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides all the complexity from our applications within the new framing layer.
HTTP/2 enables a more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on the same connection. Specifically, it allows interleaving of request and response messages on the same connection and uses an efficient coding for HTTP header fields.
HTTP/2 breaks down the HTTP protocol communication into an exchange of binary-encoded frames, which are then mapped to messages that belong to a particular stream, all of which are multiplexed within a single TCP connection.The ability to break down an HTTP message into independent frames, interleave them, and then reassemble them on the other end is the single most important enhancement of HTTP/2
One of the powerful feature of HTTP/2 is the ability of the server to send multiple responses for a single client request. That is, in addition to the response to the original request, the server can push additional resources to the client, without the client having to request each one explicitly.