Photo by Caspar Camille Rubin on Unsplash
What is http/2 protocol ?
In this article we will learn about http/2 protocol.
Although the HTTP/1.1 protocol has been around for a while, more web services have begun to use the more current HTTP/2 protocol in recent years. In this article, we will discuss about http/2 protocol and in next upcoming article we will discuss how to achieve realtime using http/2 push or http call.
What is http/2 ?
The second iteration of the HTTP protocol, known as HTTP/2, aims to address many of the problems with the previous HTTP version in order to speed up, simplify, and strengthen applications.
HTTP/2's main objectives are:
- Enable multiplexing of requests and responses
- Compressing the header
- Compatibility with the HTTP/1.1 standard's specified methods, status codes, URIs, and header parameters.
- Optimized request prioritising ensures that loading is as quick as possible for the best user experience.
- Availability of server-side push
- Backwards compatibility on the server side, ensuring that servers can continue to serve clients solely capable of using HTTP/1.1 without any modifications.
- Converting HTTP/1.1 from a text-based protocol to a binary protocol.
HTTP/2 Features
Binary: Using 1s and 0s instead of text for commands
Multiplex: Allows for the simultaneous transmission of several requests and responses.
Compression: To improve efficiency, compresses headers that have already been requested.
Stream prioritisation: This enables the simultaneous interchange of several streams.
Server push: Before a request is made, the server may transmit any additional information required.
Enhanced security is provided by HTTP/2, which supports encrypted connections.