Set-Cookie2
是一个响应首部,已废弃使用。它被服务器用来向客户端发送 cookie 数据,但是已经在协议中被标记为不赞成使用了。请使用 Set-Cookie
将其代替。
语法
Set-Cookie2: <cookie-name>=<cookie-value>
Set-Cookie2: <cookie-name>=<cookie-value>; Comment=<value>
Set-Cookie2: <cookie-name>=<cookie-value>; CommentURL=<http-url>
Set-Cookie2: <cookie-name>=<cookie-value>; Discard
Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>
Set-Cookie2: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit>
Set-Cookie2: <cookie-name>=<cookie-value>; Path=<path-value>
Set-Cookie2: <cookie-name>=<cookie-value>; Port=<port-number>
Set-Cookie2: <cookie-name>=<cookie-value>; Secure
Set-Cookie2: <cookie-name>=<cookie-value>; Version=<version-number>
// Multiple directives are also possible, for example:
Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>; Secure
// Multiple cookies are seperated by a comma
Set-Cookie2: <cookie-name>=<cookie-value>, <cookie-name>=<cookie-value>, ...
规范
浏览器兼容性
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.
Feature | Chrome | Firefox | Edge | Internet Explorer | Opera | Safari |
---|
Basic Support | (No) | (No) | (No) | (No) | (No) | (No) |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|
Basic Support | (No) | (No) | (No) | (No) | (No) | (No) | (No) |
相关内容
文档标签和贡献者