diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/headers/set-cookie2 | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/set-cookie2')
-rw-r--r-- | files/zh-cn/web/http/headers/set-cookie2/index.html | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/set-cookie2/index.html b/files/zh-cn/web/http/headers/set-cookie2/index.html new file mode 100644 index 0000000000..0129700100 --- /dev/null +++ b/files/zh-cn/web/http/headers/set-cookie2/index.html @@ -0,0 +1,72 @@ +--- +title: Set-Cookie2 +slug: Web/HTTP/Headers/Set-Cookie2 +tags: + - 废止 + - 首部 +translation_of: Web/HTTP/Headers/Set-Cookie2 +--- +<div>{{HTTPSidebar}} {{obsolete_header}}</div> + +<p><strong><code>Set-Cookie2</code></strong> 是一个响应首部,已废弃使用。它被服务器用来向客户端发送 cookie 数据,但是已经在协议中被标记为不赞成使用了。请使用 {{HTTPHeader("Set-Cookie")}} 将其代替。</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">Header type</th> + <td>{{Glossary("Response header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>no</td> + </tr> + </tbody> +</table> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox">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>, ... +</pre> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Title</th> + </tr> + <tr> + <td>{{RFC("2965", "Set-Cookie2")}}</td> + <td>Historic specification of HTTP State Management Mechanism, obsoleted by {{RFC("6265")}}</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.headers.Set-Cookie2")}}</p> + +<h2 id="相关内容">相关内容</h2> + +<ul> + <li>{{HTTPHeader("Set-Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> +</ul> |