You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!
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. Also,
Keep-Alive are ignored in HTTP/2; connection management is handled by other mechanisms there.
|Header type||General 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: indicating the minimum amount of time an idle connection has to be kept opened (in seconds). Note that timeouts longer than the TCP timeout may be ignored if no keep-alive TCP message is set at the transport level.
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 Transport Protocol Keep-Alive Header||The Keep-Alive Header (Experimental specification)|
|RFC 7230, appendix A.1.2: Keep-Alive||Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing|
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
|Chrome Full support Yes||Edge Full support Yes||Firefox Full support Yes||IE Full support Yes||Opera Full support Yes||Safari Full support Yes||WebView Android Full support Yes||Chrome Android Full support Yes||Firefox Android Full support Yes||Opera Android Full support Yes||Safari iOS Full support Yes||Samsung Internet Android Full support Yes|
- Full support
- Full support