Spec-Zone.ru › HTTP

Headers: Cookie

Cookie header

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

  • Learn more
  • See full compatibility
>

The HTTP Cookie request header contains stored HTTP cookies associated with the server (i.e., previously sent by the server with the Set-Cookie header or set in JavaScript using Document.cookie).

The Cookie header is optional and may be omitted if, for example, the browser's privacy settings block cookies.

Header type Request header
Forbidden request header Yes

Syntax

Cookie: <cookie-list>
Cookie: name=value
Cookie: name=value; name2=value2; name3=value3

Directives

<cookie-list>

A list of name-value pairs in the form of <cookie-name>=<cookie-value>. Pairs in the list are separated by a semicolon and a space.

Examples

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

Specifications

Specification
HTTP State Management Mechanism>
# cookie>

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android WebView on iOS
Cookie 1 12 1 15
1Cookies with Secure flag are not sent to unsecured http://localhost/ endpoints. See bug 281149.
18 4 14
1Cookies with Secure flag are not sent to unsecured http://localhost/ endpoints. See bug 281149.
1.0 4.4
1Cookies with Secure flag are not sent to unsecured http://localhost/ endpoints. See bug 281149.

See also

  • 413 Content Too Large
  • Set-Cookie
  • Document.cookie

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cookie

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API