How to speed up the website or application using the http2
What is this magic protocol. Wikipedia says:
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, and hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web. Current HTTP definition is located in RFC 2616. Thanks to HTTP, requests for accessing web documents and link-clicking information, as well as information from forms, are sent via the HTTP protocol. Using the HTTP protocol, we can send requests for accessing web documents, information about link-clicking, as well as data from forms. The task of websites is to publish information - whereas the HTTP protocol allows it.
Thanks to this protocol, we can read the content of the website directly from our browser. This protocol was created, in 1990 and is used to this day!
For several years in the network there is more and more information about the fact that the protocol enters the second phase and takes a completely new look. There are several reasons, but the main thing is that loading websites "consumes" more resources than ever before and handling all queries in decent time becomes problematic.
For example, to download all files from the server in http 1.1, we need to make 3 separate TCP connections
In the http/2 protocol there is only one
This is a huge change. The introduction of multiplexing gives amazing results and increases efficiency. This is particularly noticeable in the reduced delay on the side of the end user, i.e. the web browser.
Although the protocol is based mainly on the experimental Google SPDY protocol, has evolved by introducing a number of improvements throughout the entire process. The main changes are:
- Concurrency, which I have already mentioned, i.e. using one connection, the answers can be received simultaneously.
- Streaming dependencies: client can indicate to the server which resources are more important than others.
- Header compression: the size of the HTTP header has been reduced.
- The server can send resources that the client has not requested yet.
Increase in the websites speed
According to the Cloud Flare, improving the speed of page loading using HTTP/2 is almost double:
|HTTP 1.x||9.07 sec.|
Thanks to this, the quality of using the websites is much greater for clients.
In addition, virtually everything indicates that the implementation of HTTP/2 can be considered by Google as an improvement in the ranking factor. This is because HTTP/2 has a huge impact on the speed of websites loading, and as you know Google encourages to work on speed optimization.
The pages should have an additional HTTPS certificate, but this is a positive aspect and it should be remembered that the HTTP/2 protocol is not supported by all browsers, only by the latest ones.
It can be boldly concluded that the moving to this protocol does not cause any major problems, and the benefits of this solution are definitely greater.