What is the difference between HTTP 1.1 and HTTP 2

2019-03-07 11:51发布

问题:

HTTP/1.1 has served the Web well for more than fifteen years, but its age is starting to show.

Can anybody explain what is the main difference between HTTP 1.1 and 2.0?

Is there any change in the transport protocol?

回答1:

HTTP/2 supports queries multiplexing, headers compression, priority and more intelligent packet streaming management. This results in reduced latency and accelerates content download on modern web pages.

More details here.



回答2:

HTTP 2.0 is a binary protocol that multiplexes numerous streams going over a single (normally TLS-encrypted) TCP connection.

The contents of each stream are HTTP 1.1 requests and responses, just encoded and packed up differently. HTTP2 adds a number of features to manage the streams, but leaves old semantics untouched.



标签: http http2