Cookie

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.

Cookie は HTTP のリクエストヘッダーで、以前サーバーが Set-Cookie ヘッダーで送信し、保存された HTTP クッキーを含みます。

Cookie ヘッダーは任意であり、例えば、ブラウザーのプライバシー設定でクッキーをブロックしている場合などは省略できます。

ヘッダー種別 リクエストヘッダー
禁止ヘッダー名 はい

構文

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

名前と値のリストを <cookie-name>=<cookie-value> の形で表したものです。リストの組はセミコロンと空白 ('; ') で区切られます。

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

仕様書

仕様書 題名
RFC 6265, セクション 5.4: Cookie HTTP State Management Mechanism

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Cookie

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報