Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1109593 of Cookie

  • Revision slug: Web/HTTP/Headers/Cookie
  • Revision title: Cookie
  • Revision id: 1109593
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The Cookie HTTP request header contains stored HTTP cookies previously sent by the server with the {{HTTPHeader("Set-Cookie")}} header.

Header type {{Glossary("Request header")}}
{{Glossary("Forbidden header name")}} yes

Syntax

Cookie: <cookie-list>
<cookie-list>
A list of name-value-pairs int the form of <cookie-name>=<cookie-value>.

Examples

Cookie: _gat=1; PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; 

Specifications

Specification Title
{{RFC("6265", "Cookie", "5.4")}} HTTP State Management Mechanism

Browser compatibility

{{Compat}}

See also

  • {{HTTPHeader("Set-Cookie")}}
  • {{domxref("Document.cookie")}}

Revision Source

<div>{{HTTPSidebar}}</div>

<p>The <strong><code>Cookie</code></strong> HTTP request header contains stored <a href="/en-US/docs/Web/HTTP/Cookies">HTTP cookies</a> previously sent by the server with the {{HTTPHeader("Set-Cookie")}} header.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("Request header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>yes</td>
  </tr>
 </tbody>
</table>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">
Cookie: &lt;cookie-list&gt;</pre>

<dl>
 <dt>&lt;cookie-list&gt;</dt>
 <dd>A list of name-value-pairs int the form of <code>&lt;cookie-name&gt;=&lt;cookie-value&gt;</code>.</dd>
</dl>

<h2 id="Examples">Examples</h2>

<pre>
Cookie: _gat=1; PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; </pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("6265", "Cookie", "5.4")}}</td>
   <td>HTTP State Management Mechanism</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</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/README.md">https://github.com/mdn/browser-compat-data/README.md</a> and send us a pull request.</p>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

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