在线文档教程

Set-Cookie2

Set-Cookie2

过时的

此功能已过时。虽然它可能在某些浏览器中仍然有效,但它的使用是不鼓励的,因为它可以在任何时候被删除。尽量避免使用它。

过时的Set-Cookie2HTTP 响应标头用于从服务器向用户代理发送 cookie,但已被规范所弃用。Set-Cookie改为使用。

Header typeResponse header
Forbidden header nameno

句法

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

产品规格

SpecificationTitle
RFC 2965: Set-Cookie2Historic 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)