aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/http/headers/set-cookie2/index.html
blob: 598e9cc3d49b5899d78273f98b2fa709f2ffdd55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
title: Set-Cookie2
slug: Web/HTTP/Headers/Set-Cookie2
tags:
  - Cookies
  - HTTP
  - Obsoleto
  - Referencia
  - cabeçalho
translation_of: Web/HTTP/Headers/Set-Cookie2
---
<div>{{HTTPSidebar}} {{obsolete_header}}</div>

<p>O obsoleto cabeçalho de resposta HTTP <strong><code>Set-Cookie2</code></strong> usado para enviar <em>cookies</em> do servidor para o agente de usuário, mas ele foi depreciado por especificação. Use {{HTTPHeader("Set-Cookie")}} ao invés disso.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Tipo de cabeçalho</th>
   <td>{{Glossary("Response header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>não</td>
  </tr>
 </tbody>
</table>

<h2 id="Sintaxe">Sintaxe</h2>

<pre class="syntaxbox notranslate">Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Comment=&lt;value&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; CommentURL=&lt;http-url&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Discard
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Domain=&lt;domain-value&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Max-Age=&lt;non-zero-digit&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Path=&lt;path-value&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Port=&lt;port-number&gt;
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Secure
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Version=&lt;version-number&gt;

// Múltiplas diretivas também são possíveis, por exemplo:
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;; Domain=&lt;domain-value&gt;; Secure

// Múltiplos cookies são separados por vírgula
Set-Cookie2: &lt;cookie-name&gt;=&lt;cookie-value&gt;, &lt;cookie-name&gt;=&lt;cookie-value&gt;, ...
</pre>

<h2 id="Especificações">Especificações</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Especificação</th>
   <th scope="col">Título</th>
  </tr>
  <tr>
   <td>{{RFC("2965", "Set-Cookie2")}}</td>
   <td>Especificação histórica do Mecanismo de Gerenciamento de Estado do HTTP, obsoleto por {{RFC("6265")}} (<em>Historic specification of HTTP State Management Mechanism, obsoleted by</em> {{RFC("6265")}})</td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilidade_de_navegador">Compatibilidade de navegador</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="Veja_também">Veja também</h2>

<ul>
 <li>{{HTTPHeader("Set-Cookie")}}</li>
 <li>{{domxref("Document.cookie")}}</li>
</ul>