Content deleted Content added
Citation bot (talk | contribs) Removed URL that duplicated identifier. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox | #UCB_webform_linked 99/990 |
Almahmud374 (talk | contribs) mNo edit summary Tags: possible formatting issues Reverted |
||
Line 5:
{{HTTP}}
An
Cookies serve useful and sometimes essential functions on the
-----
\==Background==
\===
[[File:Cookie stack.jpg|thumb|HTTP cookies share their name with a popular baked treat.]]
The term ''cookie'' was coined by web-browser programmer Lou Montulli. It was derived from the term ''magic cookie'', which is a packet of data a program receives and sends back unchanged, used by Unix programmers.\<ref name="wdi6I"\>{{cite web|url=[http://dominopower.com/article/where-cookie-comes-from/](http://dominopower.com/article/where-cookie-comes-from/)|title=Where cookie comes from :: DominoPower|website=dominopower.com|access-date=19 October 2017|archive-url=[https://web.archive.org/web/20171019174750/http://dominopower.com/article/where-cookie-comes-from/](https://web.archive.org/web/20171019174750/http://dominopower.com/article/where-cookie-comes-from/)|archive-date=19 October 2017|url-status=live}}\</ref\>\<ref name="xVtjM"\>{{cite web|editor-last1=Raymond|editor-first1=Eric |title=magic cookie|url=[http://catb.org/jargon/html/M/magic-cookie.html](http://catb.org/jargon/html/M/magic-cookie.html)|website=The Jargon File (version 4.4.7)|access-date=8 September 2017|archive-url=[https://web.archive.org/web/20170906230653/http://www.catb.org/jargon/html/M/magic-cookie.html](https://web.archive.org/web/20170906230653/http://www.catb.org/jargon/html/M/magic-cookie.html)|archive-date=6 September 2017|url-status=live}}\</ref\>
\===History===
Magic cookies were already used in computing when computer programmer Lou Montulli had the idea of using them in web communications in June 1994.\<ref name="N4WV7"\>{{cite news |url=[https://www.nytimes.com/2001/09/04/technology/04COOK.html](https://www.nytimes.com/2001/09/04/technology/04COOK.html) |work=The New York Times |first=John |last=Schwartz |title=Giving Web a Memory Cost Its Users Privacy |date=2001-09-04 |access-date=2017-02-19 |archive-url=[https://web.archive.org/web/20111118090113/http://www.nytimes.com/2001/09/04/technology/04COOK.html](https://web.archive.org/web/20111118090113/http://www.nytimes.com/2001/09/04/technology/04COOK.html) |archive-date=2011-11-18 |url-status=live}}\</ref\> At the time, he was an employee of Netscape Communications, which was developing an e-commerce application for MCI Inc. MCI. Vint Cerf and John Klensin represented MCI in technical discussions with Netscape Communications. MCI did not want its servers to have to retain partial transaction states, which led them to ask Netscape to find a way to store that state in each user's computer instead. Cookies provided a solution to the problem of reliably implementing a Shopping cart software virtual shopping cart.\<ref name="kesan"\>{{cite journal|last1=Kesan |first1=Jey |last2=Shah |first2=Rajiv |ssrn=597543 |title=Deconstructing Code |date=2018-08-19 |journal=Yale Journal of Law and Technology |volume=6 |pages=277–389}}\</ref\>\<ref name="kristol"\>{{cite journal | last=Kristol | first=David M. | title=HTTP Cookies: Standards, Privacy, and Politics | journal=ACM Transactions on Internet Technology | publisher=Association for Computing Machinery (ACM) | volume=1 | issue=2 | year=2001 | issn=1533-5399 | doi=10.1145/502152.502153 | pages=151–198 |arxiv=cs/0105018 |s2cid=1848140}}\</ref\>
Together with John Giannandrea, Montulli wrote the initial Netscape cookie specification the same year. Version 0.9beta of Netscape Navigator Mosaic Netscape, released on October 13, 1994,\<ref name="JgNeY"\>{{cite web |url=[http://wp.netscape.com/newsref/pr/newsrelease1.html](http://wp.netscape.com/newsref/pr/newsrelease1.html) |title=Press Release: Netscape Communications Offers New Network Navigator Free On The Internet |access-date=2010-05-22 |archive-url = [https://web.archive.org/web/20061207145832/http://wp.netscape.com/newsref/pr/newsrelease1.html](https://web.archive.org/web/20061207145832/http://wp.netscape.com/newsref/pr/newsrelease1.html) |archive-date=2006-12-07}}\</ref\>\<ref name="8YpTv"\>{{cite web |url=[https://groups.google.com/group/comp.infosystems.www.users/msg/9a210e5f72278328](https://groups.google.com/group/comp.infosystems.www.users/msg/9a210e5f72278328) |title=Usenet Post by Marc Andreessen: Here it is, world\! |date=1994-10-13 |access-date=2010-05-22 |archive-url=[https://web.archive.org/web/20110427123350/http://groups.google.com/group/comp.infosystems.www.users/msg/9a210e5f72278328](https://web.archive.org/web/20110427123350/http://groups.google.com/group/comp.infosystems.www.users/msg/9a210e5f72278328) |archive-date=2011-04-27 |url-status=live}}\</ref\> supported cookies.\<ref name="kristol" /\> The first use of cookies (out of the labs) was checking whether visitors to the Netscape website had already visited the site. Montulli applied for a patent for the cookie technology in 1995, which was granted in 1998.\<ref\>{{Cite patent|country=US|number=5774670|pubdate=1998-06-30|title=Persistent client state in a hypertext transfer protocol based client-server system|assign1=[[Netscape Communications Corp.]]|inventor1-last=Montulli|inventor1-first=Lou}}\</ref\> Support for cookies was integrated with Internet Explorer in version 2, released in October 1995.\<ref name="95BiI"\>{{cite news |first=Sandi |last=Hardmeier |url=[https://www.microsoft.com/windows/IE/community/columns/historyofie.mspx](https://www.microsoft.com/windows/IE/community/columns/historyofie.mspx) |title=The history of Internet Explorer |publisher=Microsoft |date=2005-08-25 |access-date=2009-01-04 |archive-url=[https://web.archive.org/web/20051001113951/http://www.microsoft.com/windows/IE/community/columns/historyofie.mspx](https://web.archive.org/web/20051001113951/http://www.microsoft.com/windows/IE/community/columns/historyofie.mspx) |archive-date=2005-10-01 |url-status=live}}\</ref\>
The introduction of cookies was not widely known to the public at the time. In particular, cookies were accepted by default, and users were not notified of their presence.\<ref\>{{Cite journal |last=Miyazaki |first=Anthony D. |date=2008 |title=Online Privacy and the Disclosure of Cookie Use: Effects on Consumer Trust and Anticipated Patronage |url=[http://journals.sagepub.com/doi/10.1509/jppm.27.1.19](http://journals.sagepub.com/doi/10.1509/jppm.27.1.19) |journal=Journal of Public Policy & Marketing |language=en |volume=27 |issue=1 |pages=19–33 |doi=10.1509/jppm.27.1.19 |issn=0743-9156|url-access=subscription }}\</ref\> The public learned about cookies after the ''Financial Times'' published an article about them on February 12, 1996.\<ref name="B3JMd"\>{{cite news|last=Jackson|first=T|title=This Bug in Your PC is a Smart Cookie|newspaper=Financial Times|date=1996-02-12}}\</ref\> In the same year, cookies received a lot of media attention, especially because of potential privacy implications. Cookies were discussed in two U.S. Federal Trade Commission hearings in 1996 and 1997.\<ref name="UjTred" /\>
The development of the formal cookie specifications was already ongoing. In particular, the first discussions about a formal specification started in April 1995 on the www-talk electronic mailing list mailing list. A special working group within the Internet Engineering Task Force (IETF) was formed. Two alternative proposals for introducing state in HTTP transactions had been proposed by Brian Behlendorf and David Kristol respectively. But the group, headed by Kristol himself and Lou Montulli, soon decided to use the Netscape specification as a starting point. In February 1996, the working group identified third-party cookies as a considerable privacy threat. The specification produced by the group was eventually published as RFC 2109 in February 1997. It specifies that third-party cookies were either not allowed at all, or at least not enabled by default.\<ref name="RFC2109"\>{{Cite ietf|rfc=2109 |section=8.3 }}\</ref\> At this time, advertising companies were already using third-party cookies. The recommendation about third-party cookies of RFC 2109 was not followed by Netscape and Internet Explorer. RFC 2109 was superseded by RFC 2965 in October 2000.
RFC 2965 added a `Set-Cookie2` HTTP header header field, which informally came to be called "RFC 2965-style cookies" as opposed to the original `Set-Cookie` header field which was called "Netscape-style cookies".\<ref name="AGgFj"\>{{cite web |url=[https://staff.washington.edu/fmf/2009/06/19/setting-cookies/](https://staff.washington.edu/fmf/2009/06/19/setting-cookies/) |title=Setting Cookies |date=June 19, 2009 |website=staff.washington.edu |access-date=March 15, 2017 |archive-url=[https://web.archive.org/web/20170316175133/https://staff.washington.edu/fmf/2009/06/19/setting-cookies/](https://web.archive.org/web/20170316175133/https://staff.washington.edu/fmf/2009/06/19/setting-cookies/) |archive-date=March 16, 2017 |url-status=live}}\</ref\>\<ref name="V1mES"\>The edbrowse documentation version 3.5 said "Note that only Netscape-style cookies are supported. However, this is the most common flavor of cookie. It will probably meet your needs." This paragraph was removed in [[http://edbrowse.org/usersguide.html\#cook](http://edbrowse.org/usersguide.html#cook) later versions of the documentation] {{Webarchive|url=[https://web.archive.org/web/20170316024448/http://edbrowse.org/usersguide.html\#cook](https://web.archive.org/web/20170316024448/http://edbrowse.org/usersguide.html#cook)|date=2017-03-16}} further to RFC 2965's deprecation.\</ref\> `Set-Cookie2` was seldom used, however, and was deprecate d in RFC 6265 in April 2011 which was written as a definitive specification for cookies as used in the real world.\<ref name="StateMgmt"\>{{cite web|last1=Hodges|first1=Jeff|last2=Corry|first2=Bil|title='HTTP State Management Mechanism' to Proposed Standard|url=[http://www.thesecuritypractice.com/the\_security\_practice/2011/03/http-state-management-mechanism-to-proposed-standard.html](http://www.thesecuritypractice.com/the_security_practice/2011/03/http-state-management-mechanism-to-proposed-standard.html)|website=The Security Practice|access-date=17 June 2016|date=6 March 2011|archive-url=[https://web.archive.org/web/20160807062741/http://www.thesecuritypractice.com/the\_security\_practice/2011/03/http-state-management-mechanism-to-proposed-standard.html](https://web.archive.org/web/20160807062741/http://www.thesecuritypractice.com/the_security_practice/2011/03/http-state-management-mechanism-to-proposed-standard.html)|archive-date=7 August 2016|url-status=live}}\</ref\> No modern browser recognizes the `Set-Cookie2` header field.\<ref name="TASE4"\>{{Cite web|title=Set-Cookie2 - HTTP MDN|url=[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie2](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie2)|access-date=2021-03-08|website=developer.mozilla.org}}\</ref\>
-----
\==Terminology==
{{More citations needed section|date=August 2011}}
\===Session cookie===
A ''session cookie'' (also known as an ''in-memory cookie'', ''transient cookie'' or ''non-persistent cookie'') exists only in temporary memory while the user navigates a website.\<ref name="mscookie"\>{{cite web | title=Description of Persistent and Per-Session Cookies in Internet Explorer | website=support.microsoft.com | date=2007-01-24 | url=[http://support.microsoft.com/kb/223799/EN-US](http://support.microsoft.com/kb/223799/EN-US) | archive-url=[https://web.archive.org/web/20110925230707/http://support.microsoft.com/kb/223799/EN-US](https://web.archive.org/web/20110925230707/http://support.microsoft.com/kb/223799/EN-US) | archive-date=2011-09-25 | url-status=dead}}\</ref\>
Session cookies expire or are deleted when the user closes the web browser.\<ref name="HwxT6"\>{{cite web |url=[http://msdn.microsoft.com/en-us/library/ms526029(v=vs.90).aspx](http://msdn.microsoft.com/en-us/library/ms526029\(v=vs.90\).aspx) |title=Maintaining session state with cookies |work=Microsoft Developer Network |access-date=22 October 2012 |archive-url=[https://web.archive.org/web/20121014110456/http://msdn.microsoft.com/en-us/library/ms526029(v=vs.90).aspx](https://web.archive.org/web/20121014110456/http://msdn.microsoft.com/en-us/library/ms526029\(v=vs.90\).aspx) |archive-date=14 October 2012 |url-status=live}}\</ref\> Session cookies are identified by the browser by the absence of an expiration date assigned to them.
\===Persistent cookie===
A ''persistent cookie'' expires at a specific date or after a specific length of time. For the persistent cookie's lifespan set by its creator, its information will be transmitted to the server every time the user visits the website that it belongs to, or every time the user views a resource belonging to that website from another website (such as an advertisement).
For this reason, persistent cookies are sometimes referred to as ''tracking cookies''\<ref\>{{Cite journal |last1=Bujlow |first1=Tomasz |last2=Carela-Espanol |first2=Valentin |last3=Lee |first3=Beom-Ryeol |last4=Barlet-Ros |first4=Pere |date=2017 |title=A Survey on Web Tracking: Mechanisms, Implications, and Defenses |journal=Proceedings of the IEEE |volume=105 |issue=8 |pages=1476–1510 |doi=10.1109/JPROC.2016.2637878 |issn=0018-9219|hdl=2117/108437 |hdl-access=free }}\</ref\>\<ref\>{{Citation |last1=Rasaii |first1=Ali |title=Exploring the Cookieverse: A Multi-Perspective Analysis of Web Cookies |date=2023 |work=Passive and Active Measurement |volume=13882 |pages=623–651 |editor-last=Brunstrom |editor-first=Anna |url=[https://link.springer.com/10.1007/978-3-031-28486-1\_26](https://link.springer.com/10.1007/978-3-031-28486-1_26) |access-date=2024-08-24 |place=Cham |publisher=Springer Nature Switzerland |language=en |doi=10.1007/978-3-031-28486-
\===Secure cookie===
A ''secure cookie'' can only be transmitted over an encrypted connection (i.e.
\===
An ''http-only cookie'' cannot be accessed by client-side APIs, such as
-----
\===Same-site cookie===
In 2016 Google Chrome version 51 introduced\<ref name="T8177"\>{{Cite web|url=[https://www.chromestatus.com/feature/4672634709082112](https://www.chromestatus.com/feature/4672634709082112)|title='SameSite' cookie attribute, Chrome Platform tatus|website=Chromestatus.com|access-date=2016-04-23|archive-url=[https://web.archive.org/web/20160509064447/https://www.chromestatus.com/feature/4672634709082112](https://web.archive.org/web/20160509064447/https://www.chromestatus.com/feature/4672634709082112)|archive-date=2016-05-09|url-status=live}}\</ref\> a new kind of cookie with attribute `SameSite` with possible values of `Strict`, `Lax` or `None`.\<ref name="oCqyo"\>{{Cite journal|url=[https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00)|title=Same-Site Cookies draft-ietf-httpbis-cookie-same-site-00|last1=Goodwin|last2=West|first1=M.|newspaper=Ietf Datatracker|date=20 June 2016|access-date=2016-07-28|archive-url=[https://web.archive.org/web/20160816182604/https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00](https://web.archive.org/web/20160816182604/https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00)|archive-date=2016-08-16|url-status=live}}\</ref\> With attribute `SameSite=Strict`, the browsers would only send cookies to a target ___domain that is the same as the origin ___domain. This would effectively mitigate cross-site request forgery (CSRF) attacks. With `SameSite=Lax`, browsers would send cookies with requests to a target ___domain even it is different from the origin ___domain, but only for ''safe'' requests such as GET (POST is unsafe) and not third-party cookies (inside iframe). Attribute `SameSite=None` would allow third-party (cross-site) cookies, however, most browsers require \#Secure cookie secure attribute on SameSite=None cookies.\<ref name="vQf6D"\>{{Cite web|title=Require "Secure" for "SameSite=None". by miketaylr · Pull Request \#1323 · httpwg/http-extensions|url=[https://github.com/httpwg/http-extensions/pull/1323](https://github.com/httpwg/http-extensions/pull/1323)|access-date=2021-04-05|website=GitHub|language=en}}\</ref\>
The Same-site cookie is incorporated into a new RFC draft for "Cookies: HTTP State Management Mechanism"\<ref\>{{Cite report |url=[https://datatracker.ietf.org/doc/draft-ietf-httpbis-rfc6265bis/07/](https://datatracker.ietf.org/doc/draft-ietf-httpbis-rfc6265bis/07/) |title=Cookies: HTTP State Management Mechanism |last1=West |first1=Mike |last2=Wilander |first2=John |date=2020-12-07 |publisher=Internet Engineering Task Force |issue=draft-ietf-httpbis-rfc6265bis-07}}\</ref\> to update RFC 6265 (if approved).
Chrome, Firefox, and Edge started to support Same-site cookies.\<ref name="sJzIz"\>{{Cite web|url=[https://www.lambdatest.com/SameSite-cookie-attribute](https://www.lambdatest.com/SameSite-cookie-attribute)|title = Browser Compatibility Testing of 'SameSite' cookie attribute}}\</ref\> The key of rollout is the treatment of existing cookies without the SameSite attribute defined, Chrome has been treating those existing cookies as if SameSite=None, this would let all website/applications run as before. Google intended to change that default to `SameSite=Lax` in Chrome 80 planned to be released in February 2020,\<ref name="QPJhf"\>{{Cite web|title=SameSite Cookie Changes in February 2020: What You Need to Know|url=[https://blog.chromium.org/2020/02/samesite-cookie-changes-in-february.html](https://blog.chromium.org/2020/02/samesite-cookie-changes-in-february.html)|access-date=2021-04-05|website=Chromium Blog|language=en}}\</ref\> but due to potential for breakage of those applications/websites that rely on third-party/cross-site cookies and COVID-19 circumstances, Google postponed this change to Chrome 84.\<ref name="Ne4hV"\>{{Cite news|title=Temporarily rolling back SameSite Cookie Changes|url=[https://blog.chromium.org/2020/04/temporarily-rolling-back-samesite.html](https://blog.chromium.org/2020/04/temporarily-rolling-back-samesite.html)|access-date=2021-04-05|website=Chromium Blog|language=en}}\</ref\>\<ref\>{{Cite web |last=Schuh |first=Justin |date=2020-05-28 |title=Resuming SameSite Cookie Changes in July |url=[https://blog.chromium.org/2020/05/resuming-samesite-cookie-changes-in-july.html](https://blog.chromium.org/2020/05/resuming-samesite-cookie-changes-in-july.html) |access-date=2024-02-18 |website=Chromium Blog |language=en}}\</ref\>
-----
\===Supercookie===
A ''supercookie'' is a cookie with an origin of a top-level ___domain (such as `.com`) or a public suffix (such as `.co.uk`). Ordinary cookies, by contrast, have an origin of a specific ___domain name, such as `example.com`.
Supercookies can be a potential security concern and are therefore often blocked by web browsers. If unblocked by the browser, an attacker in control of a malicious website could set a supercookie and potentially disrupt or impersonate legitimate user requests to another website that shares the same top-level ___domain or public suffix as the malicious website. For example, a supercookie with an origin of `.com` could maliciously affect a request made to `example.com`, even if the cookie did not originate from `example.com`. This can be used to fake logins or change user information.
The Public Suffix List\<ref name="oN0iG"\>{{cite web|url=[https://publicsuffix.org/learn/](https://publicsuffix.org/learn/)|title=Learn more about the Public Suffix List|website=Publicsuffix.org|access-date=28 July 2016|archive-url=[https://web.archive.org/web/20160514000450/https://publicsuffix.org/learn/](https://web.archive.org/web/20160514000450/https://publicsuffix.org/learn/)|archive-date=14 May 2016|url-status=live}}\</ref\> helps to mitigate the risk that supercookies pose. The Public Suffix List is a cross-vendor initiative that aims to provide an accurate and up-to-date list of ___domain name suffixes. Older versions of browsers may not have an up-to-date list, and will therefore be vulnerable to supercookies from certain domains.
\====Other uses====
The term ''supercookie'' is sometimes used for tracking technologies that do not rely on HTTP cookies. Two such ''supercookie'' mechanisms were found on Microsoft websites in August 2011: cookie syncing that respawned MUID (machine unique identifier) cookies, and HTTP ETag ETag cookies.\<ref name="Ivyb7"\>{{cite web |last=Mayer |first=Jonathan |date=19 August 2011 |title=Tracking the Trackers: Microsoft Advertising |url=[http://cyberlaw.stanford.edu/node/6715](http://cyberlaw.stanford.edu/node/6715) |publisher=The Center for Internet and Society |access-date=28 September 2011 |archive-url=[https://web.archive.org/web/20110926122412/http://cyberlaw.stanford.edu/node/6715](https://web.archive.org/web/20110926122412/http://cyberlaw.stanford.edu/node/6715) |archive-date=26 September 2011 |url-status=live}}\</ref\> Due to media attention, Microsoft later disabled this code.\<ref name="8LKGy"\>{{cite web |last=Vijayan |first=Jaikumar |title=Microsoft disables 'supercookies' used on MSN.com visitors |website=Computerworld |date=Aug 19, 2011 |url=[http://www.computerworld.com/article/2510494/data-privacy/microsoft-disables--supercookies--used-on-msn-com-visitors.html](http://www.computerworld.com/article/2510494/data-privacy/microsoft-disables--supercookies--used-on-msn-com-visitors.html) |access-date=23 November 2014 |archive-url=[https://web.archive.org/web/20141127185609/http://www.computerworld.com/article/2510494/data-privacy/microsoft-disables--supercookies--used-on-msn-com-visitors.html](https://web.archive.org/web/20141127185609/http://www.computerworld.com/article/2510494/data-privacy/microsoft-disables--supercookies--used-on-msn-com-visitors.html) |archive-date=27 November 2014 |url-status=dead }}\</ref\> In a 2021 blog post, Mozilla used the term ''supercookie'' to refer to \#Browser cache the use of browser cache as a means of tracking users across sites.\<ref name="PyGKV"\>{{cite web |date=26 January 2021 |url=[https://blog.mozilla.org/security/2021/01/26/supercookie-protections/](https://blog.mozilla.org/security/2021/01/26/supercookie-protections/) |title=Firefox 85 Cracks Down on Supercookies |first1=Steven|last1=Englehardt|first2=Arthur|last2=Edelstein |website=Mozilla Security Blog |url-status=live |archive-url= [https://web.archive.org/web/20240225171134/https://blog.mozilla.org/security/2021/01/26/supercookie-protections/](https://web.archive.org/web/20240225171134/https://blog.mozilla.org/security/2021/01/26/supercookie-protections/) |archive-date= Feb 25, 2024 }}\</ref\>
-----
\===Zombie cookie===
{{Main|Zombie cookie|Evercookie}}
A ''zombie cookie'' is data and code that has been placed by a
\===
A cookie wall pops up on a website and informs the user of the website's cookie usage. It has no reject option, and the website is not accessible without tracking cookies.
-----
\==Structure==
A cookie consists of the following components:\<ref name="Peng, Weihong 2000"\>{{cite journal|title=HTTP Cookies, A Promising Technology|journal=ProQuest|publisher=Online Information Review|last1=Peng|first1=Weihong|last2=Cisna|first2=Jennifer|year=2000|id={{ProQuest|194487945}}}}\</ref\>\<ref name="Stenberg, Daniel 2009"\>Jim Manico quoting Daniel Stenberg, [[http://manicode.blogspot.it/2009/08/real-world-cookie-length-limits.html](http://manicode.blogspot.it/2009/08/real-world-cookie-length-limits.html) Real world cookie length limits] {{Webarchive|url=[https://web.archive.org/web/20130702114435/http://manicode.blogspot.it/2009/08/real-world-cookie-length-limits.html](https://web.archive.org/web/20130702114435/http://manicode.blogspot.it/2009/08/real-world-cookie-length-limits.html) |date=2013-07-02}}\</ref\>\<ref\>{{Cite journal |last1=Lee |first1=Wei-Bin |last2=Chen |first2=Hsing-Bai |last3=Chang |first3=Shun-Shyan |last4=Chen |first4=Tzung-Her |date=2019-01-25 |title=Secure and efficient protection for HTTP cookies with self-verification |url=[https://onlinelibrary.wiley.com/doi/10.1002/dac.3857](https://onlinelibrary.wiley.com/doi/10.1002/dac.3857) |journal=International Journal of Communication Systems |language=en |volume=32 |issue=2 |pages=e3857 |doi=10.1002/dac.3857|s2cid=59524143 |url-access=subscription }}\</ref\>
# Name
# Value
# Zero or more attributes (Attribute–value pair name/value pairs). Attributes store information such as the cookie's expiration, ___domain, and flags (such as `Secure` and `HttpOnly`).
-----
\==Uses==
\===Session management===
Cookies were originally introduced to provide a way for users to record items they want to purchase as they navigate throughout a website (a virtual ''shopping cart'' or ''shopping basket'').\<ref name="kesan" /\>\<ref name="kristol" /\> Today, however, the contents of a user's shopping cart are usually stored in a database on the server, rather than in a cookie on the client. To keep track of which user is assigned to which shopping cart, the server sends a cookie to the client that contains a unique identifier unique session identifier (typically, a long string of random letters and numbers). Because cookies are sent to the server with every request the client makes, that session identifier will be sent back to the server every time the user visits a new page on the website, which lets the server know which shopping cart to display to the user.
Another popular use of cookies is for logging into websites. When the user visits a website's login page, the web server typically sends the client a cookie containing a unique session identifier. When the user successfully logs in, the server remembers that that particular session identifier has been authenticated and grants the user access to its services.
Line 87 ⟶ 103:
Because session cookies only contain a unique session identifier, this makes the amount of personal information that a website can save about each user virtually limitless—the website is not limited to restrictions concerning how large a cookie can be. Session cookies also help to improve page load times, since the amount of information in a session cookie is small and requires little bandwidth.
\===Personalization===
Cookies can be used to remember information about the user in order to show relevant content to that user over time. For example, a web server might send a cookie containing the username that was last used to log into a website, so that it may be filled in automatically the next time the user logs in.
Many websites use cookies for personalization based on the user's preferences. Users select their preferences by entering them in a web form and submitting the form to the server. The server encodes the preferences in a cookie and sends the cookie back to the browser. This way, every time the user accesses a page on the website, the server can personalize the page according to the user's preferences. For example, the
Also,
-----
\===Tracking===
{{See also|Web tracking}}
Tracking cookies are used to track users' web browsing habits. This can also be done to some extent by using the
# If the user requests a page of the site, but the request contains no cookie, the server presumes that this is the first page visited by the user. So the server creates a unique identifier (typically a string of random letters and numbers) and sends it as a cookie back to the browser together with the requested page.
# From this point on, the cookie will automatically be sent by the browser to the server every time a new page from the site is requested. The server not only sends the page as usual but also stores the URL of the requested page, the date/time of the request, and the cookie in a log file.
By analyzing this log file, it is then possible to find out which pages the user has visited, in what sequence, and for how long. The use of such a mechanism is a key service provided by web development firms like [[https://smartupworld.com](https://smartupworld.com) smartupworld.com], which can leverage these technologies for their clients.
Corporations exploit users' web habits
|