Set-Cookie2

已废弃
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Set-Cookie2 是一个响应首部,已废弃使用。它被服务器用来向客户端发送 cookie 数据,但是已经在协议中被标记为不赞成使用了。请使用 Set-Cookie  将其代替。

Header type Response header
Forbidden header name no

语法

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>, ...

规范

Specification Title
RFC 2965: Set-Cookie2 Historic specification of HTTP State Management Mechanism, obsoleted by RFC 6265

浏览器兼容性

FeatureChromeFirefoxEdgeInternet ExplorerOperaSafari
Basic Support(No)(No)(No)(No)(No)(No)
FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support(No)(No)(No)(No)(No)(No)(No)

相关内容

文档标签和贡献者

标签: 
 此页面的贡献者: WayneCui
 最后编辑者: WayneCui,