--- title: Keep-Alive slug: Web/HTTP/Headers/Keep-Alive translation_of: Web/HTTP/Headers/Keep-Alive ---
Keep-Alive
일반 헤더는 송신자가 연결에 대한 타임아웃과 요청 최대 개수를 어떻게 정했는지에 대해 알려줍니다.
{{HTTPHeader("Connection")}} 헤더는 이 헤더를 위해 어떤 의미든 갖도록 "keep-alive"로 설정되어야 합니다. 또한, {{HTTPHeader("Connection")}}과 {{HTTPHeader("Keep-Alive")}}는 HTTP/2에서 무시됩니다; 연결 관리는 해당 프로토콜 내에서 다른 메커니즘에 의해 처리됩니다.
Header type | {{Glossary("General header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
Keep-Alive: parameters
timeout
: 유휴 연결이 계속 열려 있어야 하는 최소한의 시간(초 단위)을 가르킵니다. keep-alive TCP 메시지가 전송 계층에 설정되지 않는다면 TCP 타임아웃 이상의 타임아웃은 무시된다는 것을 알아두시기 바랍니다.max
: 연결이 닫히기 이전에 전송될 수 있는 최대 요청 수를 가리킵니다. 만약 0
이 아니라면, 해당 값은 다음 응답 내에서 다른 요청이 전송될 것이므로 비-파이프라인 연결의 경우 무시됩니다. HTTP 파이프라인은 파이프라이닝을 제한하는 용도로 해당 값을 사용할 수 있습니다.Keep-Alive 헤더를 포함하는 응답:
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", "Keep-Alive", "appendix-A.1.2")}} | 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.
{{Compat}}