Keep-Alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests.
Connection header needs to be set to "keep-alive" for this header to have any meaning.
Warning: Connection-specific header fields such as
Keep-Alive are prohibited in HTTP/2. Chrome and Firefox ignore them in HTTP/2 responses, but Safari conforms to the HTTP/2 spec requirements and won't load any response which contains them.
|Header type||Request header, Response header|
|Forbidden header name||yes|
A comma-separated list of parameters, each consisting of an identifier and a value separated by the equal sign (
'='). The following identifiers are possible:
timeout: An integer representing the time in seconds that the host will allow an idle connection to remain open before it is closed. A connection is idle if no data is sent or received by a host. A host may keep an idle connection open for longer than
timeoutseconds, but the host should attempt to retain a connection for at least
max: indicating the maximum number of requests that can be sent on this connection before closing it. Unless
0, this value is ignored for non-pipelined connections as another request will be sent in the next response. An HTTP pipeline can use it to limit the pipelining.
A response containing a
HTTP/1.1 200 OK Connection: Keep-Alive Content-Encoding: gzip Content-Type: text/html; charset=utf-8 Date: Thu, 11 Aug 2016 15:23:13 GMT Keep-Alive: timeout=5, max=1000 Last-Modified: Mon, 25 Jul 2016 04:32:39 GMT Server: Apache (body)
|Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing (HTTP/1.1)|
BCD tables only load in the browser