Cookie
Cookie
是一个请求首部,其中含有先前由服务器通过 Set-Cookie
首部投放并存储到客户端的 HTTP cookies。
这个首部可能会被完全移除,例如在浏览器的隐私设置里面设置为禁用cookie。
Header type | Request header |
---|---|
Forbidden header name | yes |
语法
Cookie: <cookie-list> Cookie: name=value Cookie: name=value; name2=value2; name3=value3
- <cookie-list>
- 一系列的名称/值对,形式为
<cookie-name>=<cookie-value>。
名称/值对之间用分号和空格 ('; ')隔开。
示例
Cookie: PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;
规范
Specification | Title |
---|---|
RFC 6265, section 5.4: Cookie | HTTP State Management Mechanism |
浏览器兼容性
BCD tables only load in the browser
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.