2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
Persistent Connections:
HTTP/1.1
Persistent connections are supported by default, allowing multiple HTTP requests and responses to be sent over a single TCP connection, reducing the overhead of establishing and closing connections.
andHTTP/1.0
The default is a short connection. Each request requires a TCP connection to be established.Connection: keep-alive
header to achieve persistent connections.Connection: keep-alive
The role of is to tell the server and the client that the TCP connection between them should be kept active so that it can be reused, rather than being closed immediately after sending a response. This feature was introduced in HTTP/1.0 and became the default behavior in HTTP/1.1.
Pipelining:
HTTP/1.1
Supports pipelining (not enabled by default), allowing the client to send multiple requests before the response to the first request arrives, which can reduce waiting time and improve efficiency.
HTTP/1.0 does not support pipelining.
Cache Control:
HTTP1.0
Main UseIf-Modified-Since/Expires
As a standard for cache judgment
HTTP1.1
More cache control strategies are introduced, such asEtag / If-None-Match
And more optional cache headers to control the caching strategy.
Error handling:
HTTP/1.1
Added some new HTTP status codes, such as100 Continue
, used to enhance error handling and intermediate responses of requests.
After receiving a 100 Continue response, the client should continue to send the request body.Expect: 100-continue
If the server decides not to continue processing the request (for example, if the request header information indicates that the request cannot be accepted), the server SHOULD return an error status code (such as 400 Bad Request) instead of 100 Continue.
Host
head:
HTTP/1.1
introducedHost
Header, allowing the client to specify the host name of the request, which makes it possible to host multiple domain names on the same server. Each domain name can be mapped to a different resource or service on the server. HTTP/1.0 does not have this header field.
Bandwidth Optimization:
HTTP1.0
There are some bandwidth waste phenomena in the process, for example, the client only needs a part of an object, but the server sends the whole object and does not support the breakpoint resume function.HTTP1.1
Then the request header is introducedrange
Header field, which allows only a certain part of the resource to be requested, that is, the return code is206(Partial Content)