Cookie header
| Header type | {{Glossary("Request header")}} |
|---|---|
| {{Glossary("Forbidden request header")}} | Yes |
Syntax
Cookie: <cookie-list>
Cookie: name=value
Cookie: name=value; name2=value2; name3=value3
Directives
Examples
Sending cookies
Cookie: PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1
Cookies with the same name
For example, suppose separate responses from the same host set these cookies:
Set-Cookie: theme=light; Path=/
Set-Cookie: theme=dark; Path=/docs
A request to /docs can contain both of them:
Cookie: theme=dark; theme=light
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{HTTPStatus("413", "413 Content Too Large")}}
- {{HTTPHeader("Set-Cookie")}}
- {{domxref("Document.cookie")}}
- Cookie Store API
这篇文档对你有帮助吗?
谢谢你的反馈!