<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://130.wiki/index.php?action=history&amp;feed=atom&amp;title=HTTP_Cookie</id>
	<title>HTTP Cookie - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://130.wiki/index.php?action=history&amp;feed=atom&amp;title=HTTP_Cookie"/>
	<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=HTTP_Cookie&amp;action=history"/>
	<updated>2026-10-27T00:31:27Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://130.wiki/index.php?title=HTTP_Cookie&amp;diff=6350&amp;oldid=prev</id>
		<title>IdleTap-bot：​由旧格式Infobox转换为新参数格式（label/data），修复空信息框（由IdleTap-bot执行）</title>
		<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=HTTP_Cookie&amp;diff=6350&amp;oldid=prev"/>
		<updated>2026-08-11T10:23:17Z</updated>

		<summary type="html">&lt;p&gt;由旧格式Infobox转换为新参数格式（label/data），修复空信息框（由IdleTap-bot执行）&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年8月11日 (二) 10:23的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;REDIRECT &lt;/del&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;XM UER&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Infobox&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| title = HTTP Cookie&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label1 = 英文名&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data1 = HTTP cookie&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label2 = 别名&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data2 = Web cookie、浏览器cookie、数码存根、小型文本文件、小甜餅&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:2&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label3 = 发明者&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data3 = [[卢·蒙特利]]（Lou Montulli）&amp;lt;ref name=&quot;:3&quot; /&amp;gt;&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label4 = 发明时间&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data4 = 1994年6月&amp;lt;ref name=&quot;:3&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label5 = 首次实现&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data5 = [[网景导航者]]0.9beta版（1994年10月13日）&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&amp;lt;ref name=&quot;:5&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label6 = 相关标准&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data6 = RFC 6265&amp;lt;ref name=&quot;:6&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| label7 = 类型&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| data7 = 状态管理机制、[[HTTP]]标头&amp;lt;ref name=&quot;:7&quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&#039;&#039;&#039;HTTP Cookie&#039;&#039;&#039;（又称&#039;&#039;&#039;Web cookie&#039;&#039;&#039;、&#039;&#039;&#039;[[浏览器]]cookie&#039;&#039;&#039;，中文俗称&#039;&#039;&#039;数码存根&#039;&#039;&#039;、&#039;&#039;&#039;小型[[文本]]文件&#039;&#039;&#039;或&#039;&#039;&#039;小甜餅&#039;&#039;&#039;）是[[服务器]]发送给[[用户]][[网页浏览器]]的一小段[[数据]]&amp;lt;ref name=&quot;:0&quot;&amp;gt;[https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Guides/Cookies 使用 HTTP Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;&amp;lt;ref name=&quot;:1&quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;。浏览器可以[[存储]]这些数据，并在之后的请求中将其发送回同一服务器&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot;&amp;gt;[[wikipedia:HTTP_cookie|HTTP cookie — Wikipedia]]&amp;lt;/ref&amp;gt;。Cookie使原本[[无状态协议|无状态]]的[[HTTP]]协议能够维持状态信息，从而让Web服务器能够在用户的设备上存储会话状态（如购物车内容）或跟踪用户的浏览活动（如登录状态或页面访问记录）&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。该技术由[[网景通信公司|网景]]员工[[卢·蒙特利]]于1994年发明&amp;lt;ref name=&quot;:3&quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;&amp;lt;ref name=&quot;:4&quot;&amp;gt;[https://baike.baidu.com/item/%E7%BD%91%E6%99%AF 网景 — 百度百科]&amp;lt;/ref&amp;gt;，首次实现于1994年10月13日发布的[[网景导航者]]0.9beta版&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&amp;lt;ref name=&quot;:5&quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;。Cookie现已成为Web的基础技术之一，被所有主流浏览器所支持&amp;lt;ref name=&quot;:4&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 历史 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;“Cookie”一词由网景浏览器程序员[[卢·蒙特利]]（Lou Montulli）创造，其源头可追溯至1979年就已出现的UNIX程序“magic cookie”——指程序收发的数据包&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。而“magic cookie”一词本身则源自[[幸运饼]]（fortune cookie）&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1994年6月，蒙特利在[[网景通信公司|网景]]工作时想到了将cookie概念应用于Web通信的点子&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:8&quot;&amp;gt;[https://www.w3cschool.cn/cookie/cookie-origin.html cookie 的起源 — W3Cschool]&amp;lt;/ref&amp;gt;。当时网景正为[[MC]]I开发电子商务应用程序，MCI方面不希望总是由其服务器保存事务状态，要求网景将状态存储在用户[[计算机]]上，Cookie便是网景提出的解决方案&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。同年，蒙特利与约翰·詹南德雷亚（John Giannandrea）一起编写了最初的网景Cookie规范&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:8&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1994年10月13日，[[网景导航者]]（Netscape Navigator）0.9beta版发布，成为首个支持Cookie的浏览器&amp;lt;ref name=&quot;:5&quot; /&amp;gt;&amp;lt;ref name=&quot;:9&quot;&amp;gt;[https://news.zol.com.cn/513/5134090.html Cookies：被妖魔化的在线隐私威胁 — ZOL新闻]&amp;lt;/ref&amp;gt;。其公开的首次使用目的是检查网景网站的访问者是否已经访问过该网站&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。蒙特利于1995年申请了Cookie技术的专利&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;此后，所有主流浏览器逐渐开始支持Cookie&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&amp;lt;ref name=&quot;:8&quot; /&amp;gt;。1997年，[[RFC 2109]]首次对Cookie机制进行了标准化定义&amp;lt;ref name=&quot;:2&quot;&amp;gt;[https://web.archive.org/web/20091004044657/http://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科（存档）]&amp;lt;/ref&amp;gt;。2011年发布的[[RFC 6265]]取代了RFC 2109和RFC 2965，成为当前Cookie的正式标准&amp;lt;ref name=&quot;:6&quot;&amp;gt;[https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Guides/Cookies 使用 HTTP Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 工作原理 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HTTP协议本身是[[无状态协议|无状态]]（stateless）的，即服务器对每个请求的处理相互独立，不保留之前请求的任何信息&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:10&quot;&amp;gt;[https://cloud.tencent.com/developer/article/2182117 解读爬虫中HTTP的秘密（高阶篇） — 腾讯云]&amp;lt;/ref&amp;gt;。Cookie机制绕开了HTTP的无状态特性，为服务器提供了一种识别和记忆用户的手段&amp;lt;ref name=&quot;:10&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie的工作流程如下&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;：&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;设置Cookie&#039;&#039;&#039;：当用户访问一个网站时，服务器可以在HTTP响应中包含一个`Set-Cookie`标头，向浏览器发送一小段数据&amp;lt;ref name=&quot;:11&quot;&amp;gt;[https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Set-Cookie Set-Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &#039;&#039;&#039;存储Cookie&#039;&#039;&#039;：浏览器接收到响应后，会根据标头中的指令存储该Cookie，包括其名称、值、过期时间、域名、路径等属性&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &#039;&#039;&#039;发送Cookie&#039;&#039;&#039;：在用户之后向同一服务器发起请求时，浏览器会自动在HTTP请求中包含`Cookie`标头，将之前存储的Cookie数据发送回服务器&amp;lt;ref name=&quot;:12&quot;&amp;gt;[https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Cookie Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &#039;&#039;&#039;服务器识别&#039;&#039;&#039;：服务器通过读取Cookie标头中的信息，即可识别用户的身份或状态，从而提供个性化或持续性的服务&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 主要用途 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie在Web应用中主要有以下三大用途&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;：&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;会话管理&#039;&#039;&#039;（Session management）：用于维护用户的登录状态、购物车内容、游戏分数等会话相关信息。用户登录后，服务器通过一个包含会话ID（Session ID）的Cookie来识别用户，使其在不同页面间无需重复登录&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;个性化设置&#039;&#039;&#039;（Personalization）：用于存储用户的偏好设置，如界面语言、主题、字体大小等&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;跟踪&#039;&#039;&#039;（Tracking）：用于记录和分析用户的行为，例如点击了哪些按钮、浏览了哪些页面。第三方跟踪Cookie常被用于跨站点收集用户浏览历史，以用于定向广告投放&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 分类 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;根据来源和生命周期，Cookie可分为以下类别：&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;会话Cookie&#039;&#039;&#039;（Session cookie）：仅在浏览器会话期间存在，关闭浏览器后即被删除。不设置过期时间（Expires）或最大存活时间（Max-Age）的Cookie即为会话Cookie&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;持久Cookie&#039;&#039;&#039;（Persistent cookie）：设置了过期时间或最大存活时间，在到期前会一直存储在用户设备上，即使关闭浏览器也不会丢失&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;第一方Cookie&#039;&#039;&#039;（First-party cookie）：由用户当前访问的网站所设置的Cookie&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;第三方Cookie&#039;&#039;&#039;（Third-party cookie）：由当前访问网站之外的第三方（如广告网络）通过嵌入内容（如广告或图片）所设置的Cookie，常用于跨站点跟踪用户行为&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 安全与隐私 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie技术自诞生以来，其隐私和安全问题一直备受关注&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;安全风险&#039;&#039;&#039;：Cookie可能被攻击者通过[[跨站脚本]]（XSS）攻击窃取，或用于[[跨站请求伪造]]（CSRF）攻击&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。为增强安全性，Cookie可设置`Secure`标志（仅通过[[HTTPS]]传输）和`HttpOnly`标志（禁止[[Java]]Script访问）&amp;lt;ref name=&quot;:11&quot; /&amp;gt;&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;隐私问题&#039;&#039;&#039;：第三方跟踪Cookie能够跨站点记录用户的浏览历史，引发了对用户隐私的广泛担忧&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。欧盟的《[[通用数据保护条例]]》（GDPR）和ePrivacy指令等法规要求网站在使用非必要Cookie时必须获得用户的知情同意&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。近年来，主流浏览器（如[[Apple Safari|Safari]]、[[Mozilla Firefox|Firefox]]）已开始逐步限制或淘汰第三方Cookie&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 标准与规范 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie的标准化历程如下：&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 1997年：[[RFC 2109]] —— 首次对Cookie进行标准化定义&amp;lt;ref name=&quot;:2&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 2000年：[[RFC 2965]] —— 对RFC 2109进行了修订，增加了对HTTP状态管理机制的详细说明&amp;lt;ref name=&quot;:2&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 2011年：&lt;/ins&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;RFC 6265&lt;/ins&gt;]] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;—— 取代RFC 2109和RFC 2965，成为当前HTTP Cookie的正式标准，定义了`Set-Cookie`和`Cookie`标头的语法与行为&amp;lt;ref name=&quot;:6&quot; /&amp;gt;。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 参考文献 ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;references /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key 130.wiki::diff:1.41:old-1331:rev-6350:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>IdleTap-bot</name></author>
	</entry>
	<entry>
		<id>https://130.wiki/index.php?title=HTTP_Cookie&amp;diff=1331&amp;oldid=prev</id>
		<title>TeodoroSeccombe：​创建页面，内容为“。”</title>
		<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=HTTP_Cookie&amp;diff=1331&amp;oldid=prev"/>
		<updated>2026-07-15T21:04:48Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“。”&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年7月15日 (三) 21:04的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Infobox|标题=HTTP Cookie|内容={{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;REDIRECT &lt;/ins&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;XM UER&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 英文名&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} HTTP cookie&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 别名&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} Web cookie、浏览器cookie、数码存根、小型文本文件、小甜餅&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:2&quot; /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 发明者&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} [[卢·蒙特利]]（Lou Montulli）&amp;lt;ref name=&quot;:3&quot; /&amp;gt;&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 发明时间&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} 1994年6月&amp;lt;ref name=&quot;:3&quot; /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 首次实现&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} [[网景导航者]]0.9beta版（1994年10月13日）&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&amp;lt;ref name=&quot;:5&quot; /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 相关标准&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} RFC 6265&amp;lt;ref name=&quot;:6&quot; /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}}-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! 类型&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{!}} 状态管理机制、[[HTTP]]标头&amp;lt;ref name=&quot;:7&quot; /&amp;gt;}}&#039;&#039;&#039;HTTP Cookie&#039;&#039;&#039;（又称&#039;&#039;&#039;Web cookie&#039;&#039;&#039;、&#039;&#039;&#039;浏览器cookie&#039;&#039;&#039;，中文俗称&#039;&#039;&#039;数码存根&#039;&#039;&#039;、&#039;&#039;&#039;小型文本文件&#039;&#039;&#039;或&#039;&#039;&#039;小甜餅&#039;&#039;&#039;）是服务器发送给用户[[网页浏览器]]的一小段数据&amp;lt;ref name=&quot;:0&quot;&amp;gt;[https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Guides/Cookies 使用 HTTP Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;&amp;lt;ref name=&quot;:1&quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;。浏览器可以存储这些数据，并在之后的请求中将其发送回同一服务器&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot;&amp;gt;[[wikipedia:HTTP_cookie|HTTP cookie — Wikipedia]]&amp;lt;/ref&amp;gt;。Cookie使原本[[无状态协议|无状态]]的[[HTTP]]协议能够维持状态信息，从而让Web服务器能够在用户的设备上存储会话状态（如购物车内容）或跟踪用户的浏览活动（如登录状态或页面访问记录）&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。该技术由[[网景通信公司|网景]]员工[[卢·蒙特利]]于1994年发明&amp;lt;ref name=&quot;:3&quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;&amp;lt;ref name=&quot;:4&quot;&amp;gt;[https://baike.baidu.com/item/%E7%BD%91%E6%99%AF 网景 — 百度百科]&amp;lt;/ref&amp;gt;，首次实现于1994年10月13日发布的[[网景导航者]]0.9beta版&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&amp;lt;ref name=&quot;:5&quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;。Cookie现已成为Web的基础技术之一，被所有主流浏览器所支持&amp;lt;ref name=&quot;:4&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 历史 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;“Cookie”一词由网景浏览器程序员[[卢·蒙特利]]（Lou Montulli）创造，其源头可追溯至1979年就已出现的UNIX程序“magic cookie”——指程序收发的数据包&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。而“magic cookie”一词本身则源自[[幸运饼]]（fortune cookie）&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1994年6月，蒙特利在[[网景通信公司|网景]]工作时想到了将cookie概念应用于Web通信的点子&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:8&quot;&amp;gt;[https://www.w3cschool.cn/cookie/cookie-origin.html cookie 的起源 — W3Cschool]&amp;lt;/ref&amp;gt;。当时网景正为MCI开发电子商务应用程序，MCI方面不希望总是由其服务器保存事务状态，要求网景将状态存储在用户计算机上，Cookie便是网景提出的解决方案&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。同年，蒙特利与约翰·詹南德雷亚（John Giannandrea）一起编写了最初的网景Cookie规范&amp;lt;ref name=&quot;:1&quot; /&amp;gt;&amp;lt;ref name=&quot;:8&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1994年10月13日，[[网景导航者]]（Netscape Navigator）0.9beta版发布，成为首个支持Cookie的浏览器&amp;lt;ref name=&quot;:5&quot; /&amp;gt;&amp;lt;ref name=&quot;:9&quot;&amp;gt;[https://news.zol.com.cn/513/5134090.html Cookies：被妖魔化的在线隐私威胁 — ZOL新闻]&amp;lt;/ref&amp;gt;。其公开的首次使用目的是检查网景网站的访问者是否已经访问过该网站&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。蒙特利于1995年申请了Cookie技术的专利&amp;lt;ref name=&quot;:1&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;此后，所有主流浏览器逐渐开始支持Cookie&amp;lt;ref name=&quot;:4&quot; /&amp;gt;&amp;lt;ref name=&quot;:8&quot; /&amp;gt;。1997年，[[RFC 2109]]首次对Cookie机制进行了标准化定义&amp;lt;ref name=&quot;:2&quot;&amp;gt;[https://web.archive.org/web/20091004044657/http://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科（存档）]&amp;lt;/ref&amp;gt;。2011年发布的[[RFC 6265]]取代了RFC 2109和RFC 2965，成为当前Cookie的正式标准&amp;lt;ref name=&quot;:6&quot;&amp;gt;[https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Guides/Cookies 使用 HTTP Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 工作原理 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HTTP协议本身是[[无状态协议|无状态]]（stateless）的，即服务器对每个请求的处理相互独立，不保留之前请求的任何信息&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:10&quot;&amp;gt;[https://cloud.tencent.com/developer/article/2182117 解读爬虫中HTTP的秘密（高阶篇） — 腾讯云]&amp;lt;/ref&amp;gt;。Cookie机制绕开了HTTP的无状态特性，为服务器提供了一种识别和记忆用户的手段&amp;lt;ref name=&quot;:10&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie的工作流程如下&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;：&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;设置Cookie&#039;&#039;&#039;：当用户访问一个网站时，服务器可以在HTTP响应中包含一个`Set-Cookie`标头，向浏览器发送一小段数据&amp;lt;ref name=&quot;:11&quot;&amp;gt;[https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Set-Cookie Set-Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &#039;&#039;&#039;存储Cookie&#039;&#039;&#039;：浏览器接收到响应后，会根据标头中的指令存储该Cookie，包括其名称、值、过期时间、域名、路径等属性&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &#039;&#039;&#039;发送Cookie&#039;&#039;&#039;：在用户之后向同一服务器发起请求时，浏览器会自动在HTTP请求中包含`Cookie`标头，将之前存储的Cookie数据发送回服务器&amp;lt;ref name=&quot;:12&quot;&amp;gt;[https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Cookie Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &#039;&#039;&#039;服务器识别&#039;&#039;&#039;：服务器通过读取Cookie标头中的信息，即可识别用户的身份或状态，从而提供个性化或持续性的服务&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 主要用途 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie在Web应用中主要有以下三大用途&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;：&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;会话管理&#039;&#039;&#039;（Session management）：用于维护用户的登录状态、购物车内容、游戏分数等会话相关信息。用户登录后，服务器通过一个包含会话ID（Session ID）的Cookie来识别用户，使其在不同页面间无需重复登录&amp;lt;ref name=&quot;:0&quot; /&amp;gt;&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;个性化设置&#039;&#039;&#039;（Personalization）：用于存储用户的偏好设置，如界面语言、主题、字体大小等&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;跟踪&#039;&#039;&#039;（Tracking）：用于记录和分析用户的行为，例如点击了哪些按钮、浏览了哪些页面。第三方跟踪Cookie常被用于跨站点收集用户浏览历史，以用于定向广告投放&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 分类 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;根据来源和生命周期，Cookie可分为以下类别：&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;会话Cookie&#039;&#039;&#039;（Session cookie）：仅在浏览器会话期间存在，关闭浏览器后即被删除。不设置过期时间（Expires）或最大存活时间（Max-Age）的Cookie即为会话Cookie&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;持久Cookie&#039;&#039;&#039;（Persistent cookie）：设置了过期时间或最大存活时间，在到期前会一直存储在用户设备上，即使关闭浏览器也不会丢失&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;第一方Cookie&#039;&#039;&#039;（First-party cookie）：由用户当前访问的网站所设置的Cookie&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;第三方Cookie&#039;&#039;&#039;（Third-party cookie）：由当前访问网站之外的第三方（如广告网络）通过嵌入内容（如广告或图片）所设置的Cookie，常用于跨站点跟踪用户行为&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 安全与隐私 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie技术自诞生以来，其隐私和安全问题一直备受关注&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;安全风险&#039;&#039;&#039;：Cookie可能被攻击者通过[[跨站脚本]]（XSS）攻击窃取，或用于[[跨站请求伪造]]（CSRF）攻击&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。为增强安全性，Cookie可设置`Secure`标志（仅通过HTTPS传输）和`HttpOnly`标志（禁止JavaScript访问）&amp;lt;ref name=&quot;:11&quot; /&amp;gt;&amp;lt;ref name=&quot;:0&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;隐私问题&#039;&#039;&#039;：第三方跟踪Cookie能够跨站点记录用户的浏览历史，引发了对用户隐私的广泛担忧&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。欧盟的《[[通用数据保护条例]]》（GDPR）和ePrivacy指令等法规要求网站在使用非必要Cookie时必须获得用户的知情同意&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。近年来，主流浏览器（如[[Apple Safari|Safari]]、[[Mozilla Firefox|Firefox]]）已开始逐步限制或淘汰第三方Cookie&amp;lt;ref name=&quot;:7&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 标准与规范 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cookie的标准化历程如下：&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 1997年：[[RFC 2109]] —— 首次对Cookie进行标准化定义&amp;lt;ref name=&quot;:2&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 2000年：[[RFC 2965]] —— 对RFC 2109进行了修订，增加了对HTTP状态管理机制的详细说明&amp;lt;ref name=&quot;:2&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 2011年：&lt;/del&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;RFC 6265&lt;/del&gt;]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;—— 取代RFC 2109和RFC 2965，成为当前HTTP Cookie的正式标准，定义了`Set-Cookie`和`Cookie`标头的语法与行为&amp;lt;ref name=&quot;:6&quot; /&amp;gt;。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 参考文献 ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;references /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TeodoroSeccombe</name></author>
	</entry>
	<entry>
		<id>https://130.wiki/index.php?title=HTTP_Cookie&amp;diff=1130&amp;oldid=prev</id>
		<title>云云：​创建页面，内容为“{{Infobox|标题=HTTP Cookie|内容={{!}}-  ! 英文名  {{!}} HTTP cookie&lt;ref name=&quot;:0&quot; /&gt;  {{!}}-  ! 别名  {{!}} Web cookie、浏览器cookie、数码存根、小型文本文件、小甜餅&lt;ref name=&quot;:1&quot; /&gt;&lt;ref name=&quot;:2&quot; /&gt;  {{!}}-  ! 发明者  {{!}} 卢·蒙特利（Lou Montulli）&lt;ref name=&quot;:3&quot; /&gt;&lt;ref name=&quot;:4&quot; /&gt;  {{!}}-  ! 发明时间  {{!}} 1994年6月&lt;ref name=&quot;:3&quot; /&gt;  {{!}}-  ! 首次实现  {{!}} 网景导航者0.9beta版（1994年10月13…”</title>
		<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=HTTP_Cookie&amp;diff=1130&amp;oldid=prev"/>
		<updated>2026-07-10T15:37:04Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{Infobox|标题=HTTP Cookie|内容={{!}}-  ! 英文名  {{!}} HTTP cookie&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;  {{!}}-  ! 别名  {{!}} Web cookie、浏览器cookie、数码存根、小型文本文件、小甜餅&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt;  {{!}}-  ! 发明者  {{!}} &lt;a href=&quot;/index.php?title=%E5%8D%A2%C2%B7%E8%92%99%E7%89%B9%E5%88%A9&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;卢·蒙特利（页面不存在）&quot; rel=&quot;nofollow&quot;&gt;卢·蒙特利&lt;/a&gt;（Lou Montulli）&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:4&amp;quot; /&amp;gt;  {{!}}-  ! 发明时间  {{!}} 1994年6月&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;  {{!}}-  ! 首次实现  {{!}} &lt;a href=&quot;/index.php?title=%E7%BD%91%E6%99%AF%E5%AF%BC%E8%88%AA%E8%80%85&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;网景导航者（页面不存在）&quot; rel=&quot;nofollow&quot;&gt;网景导航者&lt;/a&gt;0.9beta版（1994年10月13…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox|标题=HTTP Cookie|内容={{!}}-&lt;br /&gt;
! 英文名&lt;br /&gt;
{{!}} HTTP cookie&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
! 别名&lt;br /&gt;
{{!}} Web cookie、浏览器cookie、数码存根、小型文本文件、小甜餅&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
! 发明者&lt;br /&gt;
{{!}} [[卢·蒙特利]]（Lou Montulli）&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:4&amp;quot; /&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
! 发明时间&lt;br /&gt;
{{!}} 1994年6月&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
! 首次实现&lt;br /&gt;
{{!}} [[网景导航者]]0.9beta版（1994年10月13日）&amp;lt;ref name=&amp;quot;:4&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:5&amp;quot; /&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
! 相关标准&lt;br /&gt;
{{!}} RFC 6265&amp;lt;ref name=&amp;quot;:6&amp;quot; /&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
! 类型&lt;br /&gt;
{{!}} 状态管理机制、[[HTTP]]标头&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;}}&amp;#039;&amp;#039;&amp;#039;HTTP Cookie&amp;#039;&amp;#039;&amp;#039;（又称&amp;#039;&amp;#039;&amp;#039;Web cookie&amp;#039;&amp;#039;&amp;#039;、&amp;#039;&amp;#039;&amp;#039;浏览器cookie&amp;#039;&amp;#039;&amp;#039;，中文俗称&amp;#039;&amp;#039;&amp;#039;数码存根&amp;#039;&amp;#039;&amp;#039;、&amp;#039;&amp;#039;&amp;#039;小型文本文件&amp;#039;&amp;#039;&amp;#039;或&amp;#039;&amp;#039;&amp;#039;小甜餅&amp;#039;&amp;#039;&amp;#039;）是服务器发送给用户[[网页浏览器]]的一小段数据&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;[https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Guides/Cookies 使用 HTTP Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;。浏览器可以存储这些数据，并在之后的请求中将其发送回同一服务器&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:7&amp;quot;&amp;gt;[[wikipedia:HTTP_cookie|HTTP cookie — Wikipedia]]&amp;lt;/ref&amp;gt;。Cookie使原本[[无状态协议|无状态]]的[[HTTP]]协议能够维持状态信息，从而让Web服务器能够在用户的设备上存储会话状态（如购物车内容）或跟踪用户的浏览活动（如登录状态或页面访问记录）&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。该技术由[[网景通信公司|网景]]员工[[卢·蒙特利]]于1994年发明&amp;lt;ref name=&amp;quot;:3&amp;quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;:4&amp;quot;&amp;gt;[https://baike.baidu.com/item/%E7%BD%91%E6%99%AF 网景 — 百度百科]&amp;lt;/ref&amp;gt;，首次实现于1994年10月13日发布的[[网景导航者]]0.9beta版&amp;lt;ref name=&amp;quot;:4&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:5&amp;quot;&amp;gt;[https://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科]&amp;lt;/ref&amp;gt;。Cookie现已成为Web的基础技术之一，被所有主流浏览器所支持&amp;lt;ref name=&amp;quot;:4&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 历史 ==&lt;br /&gt;
“Cookie”一词由网景浏览器程序员[[卢·蒙特利]]（Lou Montulli）创造，其源头可追溯至1979年就已出现的UNIX程序“magic cookie”——指程序收发的数据包&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;。而“magic cookie”一词本身则源自[[幸运饼]]（fortune cookie）&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
1994年6月，蒙特利在[[网景通信公司|网景]]工作时想到了将cookie概念应用于Web通信的点子&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:8&amp;quot;&amp;gt;[https://www.w3cschool.cn/cookie/cookie-origin.html cookie 的起源 — W3Cschool]&amp;lt;/ref&amp;gt;。当时网景正为MCI开发电子商务应用程序，MCI方面不希望总是由其服务器保存事务状态，要求网景将状态存储在用户计算机上，Cookie便是网景提出的解决方案&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;。同年，蒙特利与约翰·詹南德雷亚（John Giannandrea）一起编写了最初的网景Cookie规范&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:8&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
1994年10月13日，[[网景导航者]]（Netscape Navigator）0.9beta版发布，成为首个支持Cookie的浏览器&amp;lt;ref name=&amp;quot;:5&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:9&amp;quot;&amp;gt;[https://news.zol.com.cn/513/5134090.html Cookies：被妖魔化的在线隐私威胁 — ZOL新闻]&amp;lt;/ref&amp;gt;。其公开的首次使用目的是检查网景网站的访问者是否已经访问过该网站&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;。蒙特利于1995年申请了Cookie技术的专利&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
此后，所有主流浏览器逐渐开始支持Cookie&amp;lt;ref name=&amp;quot;:4&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:8&amp;quot; /&amp;gt;。1997年，[[RFC 2109]]首次对Cookie机制进行了标准化定义&amp;lt;ref name=&amp;quot;:2&amp;quot;&amp;gt;[https://web.archive.org/web/20091004044657/http://zh.wikipedia.org/wiki/Cookie Cookie — 维基百科（存档）]&amp;lt;/ref&amp;gt;。2011年发布的[[RFC 6265]]取代了RFC 2109和RFC 2965，成为当前Cookie的正式标准&amp;lt;ref name=&amp;quot;:6&amp;quot;&amp;gt;[https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Guides/Cookies 使用 HTTP Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 工作原理 ==&lt;br /&gt;
HTTP协议本身是[[无状态协议|无状态]]（stateless）的，即服务器对每个请求的处理相互独立，不保留之前请求的任何信息&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:10&amp;quot;&amp;gt;[https://cloud.tencent.com/developer/article/2182117 解读爬虫中HTTP的秘密（高阶篇） — 腾讯云]&amp;lt;/ref&amp;gt;。Cookie机制绕开了HTTP的无状态特性，为服务器提供了一种识别和记忆用户的手段&amp;lt;ref name=&amp;quot;:10&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
Cookie的工作流程如下&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;：&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;设置Cookie&amp;#039;&amp;#039;&amp;#039;：当用户访问一个网站时，服务器可以在HTTP响应中包含一个`Set-Cookie`标头，向浏览器发送一小段数据&amp;lt;ref name=&amp;quot;:11&amp;quot;&amp;gt;[https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Set-Cookie Set-Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;存储Cookie&amp;#039;&amp;#039;&amp;#039;：浏览器接收到响应后，会根据标头中的指令存储该Cookie，包括其名称、值、过期时间、域名、路径等属性&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;。&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;发送Cookie&amp;#039;&amp;#039;&amp;#039;：在用户之后向同一服务器发起请求时，浏览器会自动在HTTP请求中包含`Cookie`标头，将之前存储的Cookie数据发送回服务器&amp;lt;ref name=&amp;quot;:12&amp;quot;&amp;gt;[https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Cookie Cookie — MDN Web Docs]&amp;lt;/ref&amp;gt;。&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;服务器识别&amp;#039;&amp;#039;&amp;#039;：服务器通过读取Cookie标头中的信息，即可识别用户的身份或状态，从而提供个性化或持续性的服务&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 主要用途 ==&lt;br /&gt;
Cookie在Web应用中主要有以下三大用途&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;：&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;会话管理&amp;#039;&amp;#039;&amp;#039;（Session management）：用于维护用户的登录状态、购物车内容、游戏分数等会话相关信息。用户登录后，服务器通过一个包含会话ID（Session ID）的Cookie来识别用户，使其在不同页面间无需重复登录&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;个性化设置&amp;#039;&amp;#039;&amp;#039;（Personalization）：用于存储用户的偏好设置，如界面语言、主题、字体大小等&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;。&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;跟踪&amp;#039;&amp;#039;&amp;#039;（Tracking）：用于记录和分析用户的行为，例如点击了哪些按钮、浏览了哪些页面。第三方跟踪Cookie常被用于跨站点收集用户浏览历史，以用于定向广告投放&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 分类 ==&lt;br /&gt;
根据来源和生命周期，Cookie可分为以下类别：&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;会话Cookie&amp;#039;&amp;#039;&amp;#039;（Session cookie）：仅在浏览器会话期间存在，关闭浏览器后即被删除。不设置过期时间（Expires）或最大存活时间（Max-Age）的Cookie即为会话Cookie&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;。&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;持久Cookie&amp;#039;&amp;#039;&amp;#039;（Persistent cookie）：设置了过期时间或最大存活时间，在到期前会一直存储在用户设备上，即使关闭浏览器也不会丢失&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;。&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;第一方Cookie&amp;#039;&amp;#039;&amp;#039;（First-party cookie）：由用户当前访问的网站所设置的Cookie&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;第三方Cookie&amp;#039;&amp;#039;&amp;#039;（Third-party cookie）：由当前访问网站之外的第三方（如广告网络）通过嵌入内容（如广告或图片）所设置的Cookie，常用于跨站点跟踪用户行为&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 安全与隐私 ==&lt;br /&gt;
Cookie技术自诞生以来，其隐私和安全问题一直备受关注&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;安全风险&amp;#039;&amp;#039;&amp;#039;：Cookie可能被攻击者通过[[跨站脚本]]（XSS）攻击窃取，或用于[[跨站请求伪造]]（CSRF）攻击&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。为增强安全性，Cookie可设置`Secure`标志（仅通过HTTPS传输）和`HttpOnly`标志（禁止JavaScript访问）&amp;lt;ref name=&amp;quot;:11&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;。&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;隐私问题&amp;#039;&amp;#039;&amp;#039;：第三方跟踪Cookie能够跨站点记录用户的浏览历史，引发了对用户隐私的广泛担忧&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。欧盟的《[[通用数据保护条例]]》（GDPR）和ePrivacy指令等法规要求网站在使用非必要Cookie时必须获得用户的知情同意&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。近年来，主流浏览器（如[[Apple Safari|Safari]]、[[Mozilla Firefox|Firefox]]）已开始逐步限制或淘汰第三方Cookie&amp;lt;ref name=&amp;quot;:7&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 标准与规范 ==&lt;br /&gt;
Cookie的标准化历程如下：&lt;br /&gt;
&lt;br /&gt;
* 1997年：[[RFC 2109]] —— 首次对Cookie进行标准化定义&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt;。&lt;br /&gt;
* 2000年：[[RFC 2965]] —— 对RFC 2109进行了修订，增加了对HTTP状态管理机制的详细说明&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt;。&lt;br /&gt;
* 2011年：[[RFC 6265]] —— 取代RFC 2109和RFC 2965，成为当前HTTP Cookie的正式标准，定义了`Set-Cookie`和`Cookie`标头的语法与行为&amp;lt;ref name=&amp;quot;:6&amp;quot; /&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 参考文献 ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>云云</name></author>
	</entry>
</feed>