Connection general header controls whether or not the network connection stays open after the current transaction finishes. If the value sent is
keep-alive, the connection is persistent and not closed, allowing for subsequent requests to the same server to be done.
Except for the standard hop-by-hop headers (
Proxy-Authenticate), any hop-by-hop headers used by the message must be listed in the
Connection header, so that the first proxy knows it has to consume them and not forward them further. Standard hop-by-hop headers can be listed too (it is often the case of
Keep-Alive, but this is not mandatory).
|Header type||General header|
|Forbidden header name||yes|
Connection: keep-alive Connection: close
- Indicates that either the client or the server would like to close the connection. This is the default on HTTP/1.0 requests.
- any comma-separated list of HTTP headers [Usually
- Indicates that the client would like to keep the connection open. Having a persistent connection is the default on HTTP/1.1 requests. The list of headers are the name of the header to be removed by the first non-transparent proxy or cache in-between: these headers define the connection between the emitter and the first entity, not the destination node.
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||Edge||Firefox||Internet Explorer||Opera||Safari||Android webview||Chrome for Android||Edge Mobile||Firefox for Android||Opera for Android||iOS Safari||Samsung Internet|
|Basic support||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||Edge Mobile 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