What is HTTP/2

云罗郡主
Release: 2019-01-16 09:11:03
Original
6941 people have browsed it



Many people have heard of HTTP, but don’t know much about HTTP/2. The following php Chinese website is Could you please explain in detail what HTTP/2 is?

What is HTTP/2

1: What is HTTP/2

HTTP/2 is a new communication method (protocol) when getting data from a web server ), the previous version of HTTP/1.1 was released in 1999. [Recommended reading: What is the http protocol]

In HTTP/1.1, in principle, only one request can be sent to the web server. For example, suppose you have two images displayed on a web page. After the first image is loaded, start loading the other image. If you use HTTP/2, you can handle multiple requests at the same time. If there are two images on the web page, you can Reading them simultaneously improves communication efficiency.

It is possible to make multiple requests to the web server at the same time in HTTP/1.1. However, there is a problem. Only one request can be processed as the requested order. When there are multiple requests, and the previous response to slow While the request is being processed, while also slowing down the display, the page will handle the wait state for subsequent requests.

Two: Advantages of HTTP/2

Using HTTP/2 can improve communication efficiency and therefore improve the speed of reading web pages. First of all, Google uses Chrome and Firefox to note that HTTP /2 can only be used for TLS encrypted HTTPS communication in major browsers, HTTP/2 itself is also compatible with HTTP communication, but if you use HTTP/2 according to the browser specification, you will eventually need to deal with HTTPS as well.

On web pages that store content spread across multiple domains, it cannot take full advantage of HTTP/2 handling multiple requests to servers in the same domain, ways we can distribute content to multiple domains Known as domain sharding, you may not get the results expected with HTTP/2.

HTTP/2 not only adds functions, but also improves efficiency. Compared with the previous HTTP/1.1, HTTP/2 improves the display speed of the website. Multiple requests will be processed simultaneously in HTTP/2, so please try to use it. By all means, it is more efficient to send and receive.

The above is a complete introduction to what HTTP/2 is. If you want to know more about operation and maintenance, please pay attention to the php Chinese website.




##

The above is the detailed content of What is HTTP/2. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template