http1.0

  • Only basic authentication is provided, at this point the user name and password are not encrypted
  • Short link: Data is sent through the TCP three-way handshake and four-way wave, which is inefficient
  • Breakpoint continuation is not supported: all pages and data are sent each time.

http1.1

  • The algorithm is used for authentication
  • Default long connection: Long connection means that you only need to establish a long connection to transmit multiple data. After the transmission is complete, you only need to disconnect the connection once. The connection duration of a long connection can be set by keep-alive in the request header
  • Breakpoint continuation is supported by using Range in the request header

http2.0

  • Header compression: Due to HTTP 1.1 often appears user-Agent, Cookie, Accept, Server, Range and other fields may occupy hundreds or even thousands of bytes, while Body is often only tens of bytes, resulting in a heavy header. HTTP 2.0 uses the HPACK algorithm for compression.
  • Binary format: HTTP 2.0 uses a binary format closer to TCP/IP and ditches ASCII to improve parsing efficiency
  • Security: Because security is a top priority, HTTP2.0 generally runs on HTTPS
  • Multiplexing: HTTP/2 Multiplexing allows multiple request-response messages to be sent simultaneously over a single HTTP/2 connection. Therefore HTTP/2 can easily implement multi-stream parallelism without relying on establishing multiple TCP connections