cookie
「cookie」とは・「cookie」の意味
「cookie」は、日本語では「クッキー」と訳されることが多い。一般的には、焼き菓子の一種を指すが、コンピュータの分野では、ウェブサイトがユーザーのブラウザに一時的に保存する小さなデータファイルを指す。このデータファイルには、ユーザーの訪問履歴や入力情報などが記録され、ウェブサイトの利便性向上に役立てられる。「cookie」の発音・読み方
「cookie」の発音は、IPA表記では /ˈkʊki/ となる。IPAのカタカナ読みでは「クッキー」、日本人が発音するカタカナ英語では「クッキー」と読む。発音によって意味や品詞が変わる単語ではない。「cookie」の定義を英語で解説
A 'cookie' is a small piece of data stored on the user's computer by the web browser while browsing a website. Cookies were designed to be a reliable mechanism for websites to remember stateful information or to record the user's browsing activity.「cookie」の類語
「cookie」の類語としては、「biscuit」がある。ただし、「biscuit」はイギリス英語で、「cookie」はアメリカ英語である。また、コンピュータの分野では、「HTTP cookie」、「web cookie」、「browser cookie」などとも呼ばれる。「cookie」に関連する用語・表現
「cookie」に関連する用語としては、「session」、「cache」、「browser」などがある。これらはすべて、ウェブブラウジングの際に重要な役割を果たす概念である。「session」はユーザーがウェブサイトを訪れてから離れるまでの一連の操作を指し、「cache」は一時的に保存されるデータの集合を指す。「browser」はウェブサイトを閲覧するためのソフトウェアである。「cookie」の例文
1. English example: "Please accept the cookies to continue browsing the website." (ウェブサイトの閲覧を続けるためには、クッキーを許可してください。)2. English example: "This website uses cookies to improve user experience." (このウェブサイトはユーザー体験を向上させるためにクッキーを使用しています。)
3. English example: "You can clear your cookies in the browser settings." (ブラウザの設定でクッキーを削除することができます。)
4. English example: "Cookies allow websites to remember your preferences." (クッキーにより、ウェブサイトはあなたの好みを記憶することができます。)
5. English example: "Some cookies are essential for the website to function properly." (一部のクッキーは、ウェブサイトが正常に機能するために必要です。)
6. English example: "Cookies can track your browsing history." (クッキーはあなたの閲覧履歴を追跡することができます。)
7. English example: "Cookies can be used for targeted advertising." (クッキーはターゲット広告に使用することができます。)
8. English example: "Third-party cookies are often used for online advertising." (サードパーティークッキーは、オンライン広告によく使用されます。)
9. English example: "Session cookies are deleted when you close your browser." (セッションクッキーは、ブラウザを閉じると削除されます。)
10. English example: "Persistent cookies remain on your device even after you close your browser." (パーシステントクッキーは、ブラウザを閉じた後もあなたのデバイスに残ります。)
クッキー【(アメリカ)cookie】
クッキー【Cookie】
Cookie クッキー
Cookie
Cookieとは、Webサイトを訪れたユーザーに関する情報を記録・保存し、次回に利用する技術の総称である。
Cookieは、HTTPのリクエストに含まれているテキスト文字列で、サーバーに対して、ユーザーが特定のページに再びアクセスしたことを伝える機能を持っている。具体的にCookieに記される情報は、ユーザーが最後にWebサイトを訪れた日時や、そのサイトの訪問回数、その他ユーザー情報である。主にユーザーの識別のために用いられるもので、ユーザー情報を引き継ぐ場面で何かと役に立つ。例えば、あるWebサイトから別のWebサイトに移り、再び元のWebサイトに戻ってきたときでも、ユーザーが同一人物と認識され、また認証情報も保たれた状態となる。ページを遷移するたびに新規に情報を入力する手間が省け、前回提供した情報が取得されるため、前に選択したWebサイトの機能を手軽に使用することができる。
Cookieには有効期限を設定することが可能であり、有効期限を過ぎたCookieは自動的に消滅する仕組みとなっている。ひとつのCookie機能が記録できる情報は、データが最大4096バイトまで、エントリーが最大300までとなっている。ひとつのコンピュータに対して同じサーバーが付与することのできるCookieは20個までである。20個それぞれに有効期限を設けることが可能である。
Cookieは元々、Netscape Communications社が自社のWebブラウザに向けて開発したプログラムを原型としている。今では多くのブラウザがCookieに対応しており、デファクトスタンダードとして認知されている。
Cookieは個人のアクセス履歴などを保存しているので、悪用すればプライバシーを侵害する道具としても利用可能であるとの指摘がある。主要なブラウザの多くは、Cookieの有効・無効を設定することが可能であるため、ユーザーによってはセキュリティを考慮してCookieを無効に設定していることも多い。
Cookie クラス
アセンブリ: System (system.dll 内)


Cookie クラスは、HTTP 応答で受信した Cookie に関する情報を取得するために、クライアント アプリケーションで使用されます。HTTP 応答ヘッダーを解析する際にサポートされる Cookie 形式は、Netscape、RFC 2109、および RFC 2965 です。
Cookie のインスタンスの初期プロパティ値の一覧については、各種の Cookie コンストラクタのトピックを参照してください。

URL に要求を送信し、応答で返される Cookie を表示する例を次に示します。
Imports System.Net Imports System ' This example is run at the command line. ' Specify one argument: the name of the host to ' receive the request. ' If the request is sucessful, the example displays the contents of the cookies ' returned by the host. Public Class CookieExample Public Shared Sub Main(args() As String) If args Is Nothing OrElse args.Length <> 1 Then Console.WriteLine("Specify the URL to receive the request.") Environment.Exit(1) End If Dim request As HttpWebRequest = CType(WebRequest.Create(args(0)), HttpWebRequest) request.CookieContainer = New CookieContainer() Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse) ' Print the properties of each cookie. Dim cook As Cookie For Each cook In response.Cookies Console.WriteLine("Cookie:") Console.WriteLine("{0} = {1}", cook.Name, cook.Value) Console.WriteLine("Domain: {0}", cook.Domain) Console.WriteLine("Path: {0}", cook.Path) Console.WriteLine("Port: {0}", cook.Port) Console.WriteLine("Secure: {0}", cook.Secure) Console.WriteLine("When issued: {0}", cook.TimeStamp) Console.WriteLine("Expires: {0} (expired? {1})", cook.Expires, cook.Expired) Console.WriteLine("Don't save: {0}", cook.Discard) Console.WriteLine("Comment: {0}", cook.Comment) Console.WriteLine("Uri for comments: {0}", cook.CommentUri) Console.WriteLine("Version: RFC {0}", IIf(cook.Version = 1, "2109", "2965")) ' Show the string representation of the cookie. Console.WriteLine("String: {0}", cook.ToString()) Next cook End Sub 'Main End Class 'CookieExample ' Output from this example will be vary depending on the host name specified , ' but will be similar to the following. ' 'Cookie: 'CustomerID = 13xyz 'Domain: .contoso.com 'Path: / 'Port: 'Secure: False 'When issued: 1/14/2003 3:20:57 PM 'Expires: 1/17/2013 11:14:07 AM (expired? False) 'Don't save: False 'Comment: 'Uri for comments: 'Version: RFC 2965 'String: CustomerID = 13xyz '
using System.Net; using System; namespace Examples.System.Net.Cookies { // This example is run at the command line. // Specify one argument: the name of the host to // send the request to. // If the request is sucessful, the example displays the contents of the cookies // returned by the host. public class CookieExample { public static void Main(string[] args) { if (args == null || args.Length != 1) { Console.WriteLine("Specify the URL to receive the request."); Environment.Exit(1); } HttpWebRequest request = (HttpWebRequest)WebRequest.Create(args[0]); request.CookieContainer = new CookieContainer(); HttpWebResponse response = (HttpWebResponse) request.GetResponse(); // Print the properties of each cookie. foreach (Cookie cook in response.Cookies) { Console.WriteLine("Cookie:"); Console.WriteLine("{0} = {1}", cook.Name, cook.Value); Console.WriteLine("Domain: {0}", cook.Domain); Console.WriteLine("Path: {0}", cook.Path); Console.WriteLine("Port: {0}", cook.Port); Console.WriteLine("Secure: {0}", cook.Secure); Console.WriteLine("When issued: {0}", cook.TimeStamp); Console.WriteLine("Expires: {0} (expired? {1})", cook.Expires, cook.Expired); Console.WriteLine("Don't save: {0}", cook.Discard); Console.WriteLine("Comment: {0}", cook.Comment); Console.WriteLine("Uri for comments: {0}", cook.CommentUri); Console.WriteLine("Version: RFC {0}" , cook.Version == 1 ? "2109" : "2965"); // Show the string representation of the cookie. Console.WriteLine ("String: {0}", cook.ToString()); } } } } // Output from this example will be vary depending on the host name specified, // but will be similar to the following. /* Cookie: CustomerID = 13xyz Domain: .contoso.com Path: / Port: Secure: False When issued: 1/14/2003 3:20:57 PM Expires: 1/17/2013 11:14:07 AM (expired? False) Don't save: False Comment: Uri for comments: Version: RFC 2965 String: CustomerID = 13xyz */
#using <System.dll> using namespace System; using namespace System::Net; // This example is run at the command line. // Specify one argument: the name of the host to // send the request to. // If the request is sucessful, the example displays the contents of the cookies // returned by the host. int main() { array<String^>^args = Environment::GetCommandLineArgs(); if ( args == nullptr || args->Length != 2 ) { Console::WriteLine( "Specify the URL to receive the request." ); Environment::Exit( 1 ); } HttpWebRequest^ request = dynamic_cast<HttpWebRequest^>(WebRequest::Create( args[ 1 ] )); request->CookieContainer = gcnew CookieContainer; HttpWebResponse^ response = dynamic_cast<HttpWebResponse^>(request->GetResponse()); response->Cookies = request->CookieContainer->GetCookies( request->RequestUri ); // Print the properties of each cookie. System::Collections::IEnumerator^ myEnum = response->Cookies->GetEnumerator(); while ( myEnum->MoveNext() ) { Cookie^ cook = safe_cast<Cookie^>(myEnum->Current); Console::WriteLine( "Cookie:" ); Console::WriteLine( "{0} = {1}", cook->Name, cook->Value ); Console::WriteLine( "Domain: {0}", cook->Domain ); Console::WriteLine( "Path: {0}", cook->Path ); Console::WriteLine( "Port: {0}", cook->Port ); Console::WriteLine( "Secure: {0}", cook->Secure ); Console::WriteLine( "When issued: {0}", cook->TimeStamp ); Console::WriteLine( "Expires: {0} (expired? {1})", cook->Expires, cook->Expired ); Console::WriteLine( "Don't save: {0}", cook->Discard ); Console::WriteLine( "Comment: {0}", cook->Comment ); Console::WriteLine( "Uri for comments: {0}", cook->CommentUri ); Console::WriteLine( "Version: RFC {0}", cook->Version == 1 ? (String^)"2109" : "2965" ); // Show the string representation of the cookie. Console::WriteLine( "String: {0}", cook ); } } // Output from this example will be vary depending on the host name specified, // but will be similar to the following. /* Cookie: CustomerID = 13xyz Domain: .contoso.com Path: / Port: Secure: False When issued: 1/14/2003 3:20:57 PM Expires: 1/17/2013 11:14:07 AM (expired? False) Don't save: False Comment: Uri for comments: Version: RFC 2965 String: CustomerID = 13xyz */

System.Net.Cookie


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Cookie コンストラクタ ()
アセンブリ: System (system.dll 内)


既定のコンストラクタは、name、value、path、および domain について、空の文字列 ("") を使用してすべてのフィールドを既定値に初期化します。Cookie クラスのインスタンスを使用する前に、少なくとも Name プロパティを初期化する必要があります。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Cookie コンストラクタ (String, String, String, String)
アセンブリ: System (system.dll 内)

Dim name As String Dim value As String Dim path As String Dim domain As String Dim instance As New Cookie(name, value, path, domain)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Cookie コンストラクタ (String, String)
アセンブリ: System (system.dll 内)




Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Cookie コンストラクタ

名前 | 説明 |
---|---|
Cookie () | Cookie クラスの新しいインスタンスを初期化します。 |
Cookie (String, String) | 指定した Name と Value を使用して、Cookie クラスの新しいインスタンスを初期化します。 |
Cookie (String, String, String) | 指定した Name、Value、および Path を使用して、Cookie クラスの新しいインスタンスを初期化します。 |
Cookie (String, String, String, String) | 指定した Name、Value、Path、および Domain を使用して、Cookie クラスの新しいインスタンスを初期化します。 |

Cookie コンストラクタ (String, String, String)
アセンブリ: System (system.dll 内)

Dim name As String Dim value As String Dim path As String Dim instance As New Cookie(name, value, path)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Cookie プロパティ

名前 | 説明 | |
---|---|---|
![]() | Comment | サーバーが Cookie に追加できるコメントを取得または設定します。 |
![]() | CommentUri | サーバーが Cookie で提供できる URI コメントを取得または設定します。 |
![]() | Discard | サーバーが設定した破棄フラグを取得または設定します。 |
![]() | Domain | Cookie が有効な URI を取得または設定します。 |
![]() | Expired | Cookie の現在の状態を取得または設定します。 |
![]() | Expires | Cookie の有効期限の日時を DateTime として取得または設定します。 |
![]() | HttpOnly | ページ スクリプトまたは他のアクティブ コンテンツがこの Cookie にアクセスできるかどうかを決定します。 |
![]() | Name | Cookie の名前を取得または設定します。 |
![]() | Path | Cookie が適用される URI を取得または設定します。 |
![]() | Port | Cookie が適用される TCP ポートのリストを取得または設定します。 |
![]() | Secure | Cookie のセキュリティ レベルを取得または設定します。 |
![]() | TimeStamp | Cookie が DateTime として発行された時刻を取得します。 |
![]() | Value | Cookie の Value を取得または設定します。 |
![]() | Version | Cookie が準拠する HTTP 状態保守のバージョンを取得または設定します。 |

Cookie メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 オーバーライドされます。 |
![]() | GetHashCode | オーバーライドされます。 Object.GetHashCode メソッドをオーバーライドします。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | オーバーライドされます。 Object.ToString メソッドをオーバーライドします。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

Cookie メンバ
Cookie を管理するために使用するプロパティとメソッドのセットを提供します。このクラスは継承できません。
Cookie データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | Cookie | オーバーロードされます。 Netscape 仕様に準拠し、Cookie クラスの新しいインスタンスを初期化します。通常、アプリケーションで Cookie クラスを構築する必要はありません。HTTP 応答で受信された Set-Cookie ヘッダーに基づいて自動的に作成されるからです。 |

名前 | 説明 | |
---|---|---|
![]() | Comment | サーバーが Cookie に追加できるコメントを取得または設定します。 |
![]() | CommentUri | サーバーが Cookie で提供できる URI コメントを取得または設定します。 |
![]() | Discard | サーバーが設定した破棄フラグを取得または設定します。 |
![]() | Domain | Cookie が有効な URI を取得または設定します。 |
![]() | Expired | Cookie の現在の状態を取得または設定します。 |
![]() | Expires | Cookie の有効期限の日時を DateTime として取得または設定します。 |
![]() | HttpOnly | ページ スクリプトまたは他のアクティブ コンテンツがこの Cookie にアクセスできるかどうかを決定します。 |
![]() | Name | Cookie の名前を取得または設定します。 |
![]() | Path | Cookie が適用される URI を取得または設定します。 |
![]() | Port | Cookie が適用される TCP ポートのリストを取得または設定します。 |
![]() | Secure | Cookie のセキュリティ レベルを取得または設定します。 |
![]() | TimeStamp | Cookie が DateTime として発行された時刻を取得します。 |
![]() | Value | Cookie の Value を取得または設定します。 |
![]() | Version | Cookie が準拠する HTTP 状態保守のバージョンを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 オーバーライドされます。 |
![]() | GetHashCode | オーバーライドされます。 Object.GetHashCode メソッドをオーバーライドします。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | オーバーライドされます。 Object.ToString メソッドをオーバーライドします。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Cookie
クッキー (曖昧さ回避)
クッキー(cookie、くっきー)
製品
- クッキー - 洋菓子。焼き菓子のひとつ。
- マジッククッキー - 通信プログラム間で受け渡されるデータのトークン
- HTTP cookie
- Flashクッキー(Local Shared Object)
- Cookie (雑誌) - 集英社発行の少女漫画雑誌。
- COOKIE - 尾崎豊の楽曲。アルバム『誕生』に収録。
キャラクター、人物
人物
- くっきー! - 日本のお笑いコンビ・野性爆弾の川島邦裕。
- en:Cookie (singer) - 英国のソウルシンガー、ジャネット・ラムス。
- 日本の歌手、倉木麻衣の愛称。
- アメリカ合衆国の元プロ野球選手、ライアン・クックの愛称。
- ベネズエラのプロ野球選手、カルロス・カラスコの愛称。
動物
- 台湾のネコ、蔡想想の別称。
- クッキー (オウム) - アメリカの長寿記録のオウム。
キャラクター
- クッキー - マリオシリーズに登場するキャラクター。
- 犬をモチーフにしたキャラクター「クッキー・アン (Cookie Ann)」の愛称。→ダッフィー#クッキー・アン (2019年に改称)を参照
- クッキーモンスター - セサミストリートに登場するキャラクター。
場所
- クッキー (スーパーマーケット) - 鹿児島県にあったスーパーマーケット。
- 埼玉県久喜市にあるショッピングセンター「クッキープラザ」の通称。
関連項目
Cookie
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/06/03 15:52 UTC 版)
1999年に「ぶ〜け」との合同増刊として創刊、2号発行されたあと、2000年5月に独立した雑誌として新創刊。詳しくは該当項目を参照。
※この「Cookie」の解説は、「りぼん」の解説の一部です。
「Cookie」を含む「りぼん」の記事については、「りぼん」の概要を参照ください。
固有名詞の分類
- Cookieのページへのリンク