HTTP cookie

From Wikipedia, the free encyclopedia
  (Redirected from Http cookies)
Jump to: navigation, search


Although cookies cannot carry viruses, and cannot install malware on the host computer,[2] tracking cookies and especially third-party tracking cookies are commonly used as ways to compile long-term records of individuals' browsing histories—a potential privacy concern that prompted European[3] and U.S. law makers to take action in 2011.[4][5] Cookies can also store passwords and form content a user has previously entered, such as a credit card number or an address.



The term "cookie" was derived from the term "magic cookie", which is a packet of data a program receives and sends back unchanged. Magic cookies were already used in computing when computer programmer Lou Montulli had the idea of using them in web communications in June 1994.[7] At the time, he was an employee of Netscape Communications, which was developing an e-commerce application for MCI. Vint Cerf and John Klensin represented MCI in technical discussions with Netscape Communications. Not wanting the MCI servers to have to retain partial transaction states led to MCI's request to Netscape to find a way to store that state in each user's computer. Cookies provided a solution to the problem of reliably implementing a virtual shopping cart.[8][9]

Together with John Giannandrea, Montulli wrote the initial Netscape cookie specification the same year. Version 0.9beta of Mosaic Netscape, released on October 13, 1994,[10][11] supported cookies. 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, and US 5774670  was granted in 1998. Support for cookies was integrated in Internet Explorer in version 2, released in October 1995.[12]

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. The general public learned about cookies after the Financial Times published an article about them on February 12, 1996.[13] 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.

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 mailing list. A special working group within the 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 Aron Afatsuom, 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.


A definitive specification for cookies as used in the real world was published as RFC 6265 in April 2011.


Session cookie[edit]

A session cookie, also known as an in-memory cookie or transient cookie, exists only in temporary memory while the user navigates the website.[14] Web browsers normally delete session cookies when the user closes the browser.[15][16] Unlike other cookies, session cookies do not have an expiration date assigned to them, which is how the browser knows to treat them as session cookies.

Persistent cookie[edit]

Instead of expiring when the web browser is closed as session cookies do, persistent cookies expire at a specific date or after a specific length of time. This means that, for the cookie's entire lifespan (which can be as long or as short as its creators want), 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 because they can be used by advertisers to record information about a user's web browsing habits over an extended period of time. However, they are also used for "legitimate" reasons as well, such as keeping a user logged into her email account so she does not have to enter her login credentials everytime she opens her browser.

Secure cookie[edit]

A secure cookie can only be transmitted over an encrypted connection (i.e. HTTPS). This makes the cookie less likely to be exposed to cookie theft via eavesdropping.

HttpOnly cookie[edit]

HttpOnly cookies can only be used when transmitted via HTTP (or HTTPS). They are not accessible through non-HTTP APIs such as JavaScript. This restriction mitigates, but does not eliminate, the threat of session cookie theft via cross-site scripting (XSS).[17] HttpOnly cookies are supported by most modern browsers.[18][19]

Third-party cookie[edit]

Normally, a cookie's domain name will match the domain name that is shown in the web browser's address bar. This is called a first-party cookie. Third-party cookies, however, belong to domains different from the one shown in the address bar. These sorts of cookies typically appear when web pages feature content, such as banner advertisements, from external websites. This opens up the potential for tracking the user's browsing history, and is often used by advertisers in an effort to serve relevant advertisements to each user.

As an example, suppose a user visits This web site contains an advertisement from, which, when downloaded, sets a cookie belonging to the advertisements's domain ( Then, the user visits another website,, which also contains an advertisement from, and which also sets a cookie belonging to that domain ( Eventually, both of these cookies will be sent to the advertiser when loading their advertisements or visiting their website. The advertiser can then use these cookies to build up a browsing history of the user across all the websites that have ads from this advertiser.

As of 2014, some websites were setting cookies readable for over 100 third-party domains.[20] On average, a single website was setting 10 cookies, with a maximum number of cookies (first- and third-party) reaching over 800.[21]

Most modern web browsers contain privacy settings that can block third-party cookies.


A "supercookie" is a cookie with an origin of a Top-Level Domain (such as .com) or a Public Suffix (such as Ordinary cookies, by contrast, have an origin of a specific domain name, such as

It is important for browsers to block supercookies, due to the security holes they introduce. If unblocked, 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, even if the cookie did not originate from This can be used to fake logins or change user information.


Supercookie (other uses)[edit]

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 ETag cookies.[22] Due to media attention, Microsoft later disabled this code.[23]

Zombie cookie[edit]

Main articles: Zombie cookie and Evercookie

Zombie cookies are cookies that are automatically recreated after being deleted. This is accomplished with the help of a client-side script. The script starts by storing the cookie's content in multiple locations, such as Flash local storage, HTML5 storage, and other client-side storage locations. When the script detects the cookie's absence, it recreates the cookie using the data stored in these locations.


A cookie consists of the following components:[24][25]

  1. Name
  2. Value
  3. Zero or more attributes


Session management[edit]

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").[8][9] 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 web server sends a cookie to the client that contains a 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 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.




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 last used to log into a website so that it may be filled in automatically the next time the user logs in.



Tracking cookies are used to track users' web browsing habits. This can also be done to some extent by using the IP address of the computer requesting the page or the referrer field of the HTTP request header, but cookies allow for greater precision. This can be demonstrated as follows:

  2. 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 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.



A possible interaction between a web browser and a server holding a web page in which the server sends a cookie to the browser and the browser sends it back when requesting another page.

Cookies are arbitrary pieces of data, usually chosen by the web server, and stored on the client computer by the browser. The browser sends them to the server with every request, introducing state (memory of previous events) into otherwise stateless HTTP transactions. Without cookies, each retrieval of a web page or component of a web page would be an isolated event, largely unrelated to all other page views made by the user on the website. Although cookies are usually set by the web server, they can also be set by the client using a scripting language such as JavaScript (provided the cookie's HttpOnly flag is not set).

The cookie specifications[19][26][27] require that browsers must meet the following requirements in order to support cookies:

  • Can support cookies that are at least 4,096 bytes in size
  • Can store at least 50 cookies per domain (i.e. per website)
  • Can store at least 3000 cookies in total

Setting a cookie[edit]

Cookies are set using the HTTP Set-Cookie header, sent in an HTTP response. This header instructs the browser to store the cookie and send it back in future requests to the server (the browser will, of course, ignore this header if it does not support cookies or has disabled cookies).

As an example, the browser sends its first request to the homepage of the website:

GET /index.html HTTP/1.1

The server responds with two Set-Cookie headers:

HTTP/1.0 200 OK
Content-type: text/html
Set-Cookie: theme=light

The server's HTTP response contains the contents of the website's homepage. But it also instructs the browser to set two cookies. The first, "theme", is considered to be a "session" cookie, since it does not have an Expires or Max-Age attribute. Session cookies are typically deleted by the browser when the browser closes. The second, "sessionToken" contains an "Expires" attribute, which instructs the browser to delete the cookie at a specific date and time.

Next, the browser sends another request to visit the spec.html page on the website. This request contains a Cookie header, which contains the two cookies that the server instructed the browser to set.

GET /spec.html HTTP/1.1
Cookie: theme=light; sessionToken=abc123

This way, the server knows that this request is related to the previous one. The server would answer by sending the requested page, and possibly adding other cookies as well using the Set-Cookie header.

The value of a cookie can be modified by the server by including a Set-Cookie header in response to a page request. The browser then replaces the old value with the new value.

The value of a cookie may consist of any printable ASCII character (! through ~, unicode \u0021through \u007E) excluding , and ; and excluding whitespace. The name of a cookie excludes the same characters, as well as =, since that is the delimiter between the name and value. The cookie standard RFC2965 is more limiting but not implemented by browsers.

The term "cookie crumb" is sometimes used to refer to a cookie's name-value pair.[28]

Cookies can also be set by scripting languages such as JavaScript that run within the browser. In JavaScript, the object document.cookie is used for this purpose. For example, the instruction document.cookie = "temperature=20" creates a cookie of name "temperature" and value "20".[29]

Cookie attributes[edit]

In addition to a name and value, cookies can also have one or more attributes. Browsers do not send cookie attributes back to the server. They only send the cookie’s name and value. Cookie attributes are used by browsers to determine when to delete a cookie, block a cookie or whether to send a cookie to the server.

Domain and Path[edit]

The Domain and Path attributes define the scope of the cookie. They essentially tell the browser what website the cookie belongs to. For obvious security reasons, cookies can only be set on the current resource's top domain and its sub domains, and not for another domain and its sub domains. For example, the website cannot set a cookie that has a domain of because this would allow the website to control the cookies of

If a cookie's domain and path are not specified by the server, they default to the domain and path of the resource that was requested.[30] However, there is a difference between a cookie set from without a domain, and a cookie set with the domain. In the former case, the cookie will only be sent for requests to In the latter case, all sub domains are also included (for example,[31][32]

Below is an example of some Set-Cookie HTTP response headers that are sent from a website after a user logged in. The HTTP request was sent to a webpage within the subdomain:

Set-Cookie: HSID=AYQEVn….DKrdst;; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly
Set-Cookie: SSID=Ap4P….GTEq;; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly

The first cookie LSID has no Domain attribute, and a Path attribute set to /accounts, which tells the browser to use the cookie only when requesting pages contained in (the domain is derived from the request domain). The other two cookies, HSID and SSID, would be used when the browser requests any subdomain in on any path (for example The prepending dot is optional in recent standards, but can be added for compatibility with RFC 2109 based implementations.[33]

Expires and Max-Age[edit]

The Expires attribute defines a specific date and time for when the browser should delete the cookie. The date/time is specified in the form Wdy, DD Mon YYYY HH:MM:SS GMT.[34]

Alternatively, the Max-Age attribute can be used to set the cookie’s expiration as an interval of seconds in the future, relative to the time the browser received the cookie. Below is an example of three Set-Cookie headers that were received from a website after a user logged in:

Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 21:47:38 GMT; Path=/;; HttpOnly
Set-Cookie: made_write_conn=1295214458; Path=/;
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/;; HttpOnly

The first cookie, lu, is set to expire sometime on 15 January 2013. It will be used by the client browser until that time. The second cookie, made_write_conn, does not have an expiration date, making it a session cookie. It will be deleted after the user closes their browser. The third cookie, reg_fb_gate, has its value changed to "deleted", with an expiration time in the past. The browser will delete this cookie right away. Note that cookie will only be deleted if the domain and path attributes in the Set-Cookie field match the values used when the cookie was created.

Secure and HttpOnly[edit]



The HttpOnly attribute directs browsers not to expose cookies through channels other than HTTP (and HTTPS) requests. Cookies with this attribute are not accessible via non-HTTP methods, such as calls via JavaScript (using document.cookie), and therefore cannot be stolen easily via cross-site scripting (a pervasive attack technique).[35] Facebook and Google use the HttpOnly attribute extensively, among others.

Browser settings[edit]

Most modern browsers support cookies and allow the user to disable them. The following are common options:[36]

  • To view and selectively delete cookies using a cookie manager.
  • To fully wipe all private data, including cookies.

By default, Internet Explorer allows third-party cookies only if they are accompanied by a P3P "CP" (Compact Policy) field.[37]

Add-on tools for managing cookie permissions also exist.[38][39][40][41]

Privacy and third-party cookies[edit]

Cookies have some important implications on the privacy and anonymity of web users. While cookies are sent only to the server setting them or a server in the same Internet domain, a web page may contain images or other components stored on servers in other domains. Cookies that are set during retrieval of these components are called third-party cookies. The older standards for cookies, RFC 2109 and RFC 2965, specify that browsers should protect user privacy and not allow sharing of cookies between servers by default; however, the newer standard, RFC 6265, explicitly allows user agents to implement whichever third-party cookie policy they wish. Most browsers, such as Mozilla Firefox, Internet Explorer, Opera and Google Chrome do allow third-party cookies by default, as long as the third-party website has Compact Privacy Policy published. Newer versions of Safari block third-party cookies, and this is planned for Mozilla Firefox as well (initially planned for version 22 but was postponed indefinitely).[42]

In this fictional example, an advertising company has placed banners in two websites. Hosting the banner images on its servers and using third-party cookies, the advertising company is able to track the browsing of users across these two sites.

Advertising companies use third-party cookies to track a user across multiple sites. In particular, an advertising company can track a user across all pages where it has placed advertising images or web bugs. Knowledge of the pages visited by a user allows the advertising company to target advertisements to the user's presumed preferences.



The United States government has set strict rules on setting cookies in 2000 after it was disclosed that the White House drug policy office used cookies to track computer users viewing its online anti-drug advertising. In 2002, privacy activist Daniel Brandt found that the CIA had been leaving persistent cookies on computers which had visited its website. When notified it was violating policy, CIA stated that these cookies were not intentionally set and stopped setting them.[44] On December 25, 2005, Brandt discovered that the National Security Agency (NSA) had been leaving two persistent cookies on visitors' computers due to a software upgrade. After being informed, the NSA immediately disabled the cookies.[45]

EU cookie directive[edit]

In 2002, the European Union launched the Directive on Privacy and Electronic Communications, a policy requiring end users’ consent for the placement of cookies, and similar technologies for storing and accessing information on users’ equipment.[46][47] In particular, Article 5 Paragraph 3 mandates that storing data in a user’s computer can only be done if the user is provided information about how this data is used, and the user is given the possibility of denying this storing operation.

Directive 95/46/EC defines "the data subject’s consent" as: “any freely given specific and informed indication of his wishes by which the data subject signifies his agreement to personal data relating to him being processed”.[48] Consent must involve some form of communication where individuals knowingly indicate their acceptance.[47]


In June 2012, European data protection authorities adopted an opinion which clarifies that some cookie users might be exempt from the requirement to gain consent:

  • First party analytics cookies are not likely to create a privacy risk if websites provide clear information about the cookies to users and privacy safeguards.[49]


The P3P specification offers possibility for a server to state a privacy policy using an HTTP header, which specifies which kind of information it collects and for which purpose. These policies include (but are not limited to) the use of information gathered using cookies. According to the P3P specification, a browser can accept or reject cookies by comparing the privacy policy with the stored user preferences or ask the user, presenting them the privacy policy as declared by the server. However, the P3P specification was criticized by web developers for its complexity, only Internet Explorer provides adequate support for the specification, and some websites used incorrect code in their headers (while Facebook, for a period, jokingly used "HONK" as its P3P header).[51]

Third-party cookies can be blocked by most browsers to increase privacy and reduce tracking by advertising and tracking companies without negatively affecting the user's web experience. Many advertising operators have an opt-out option to behavioural advertising, with a generic cookie in the browser stopping behavioural advertising.[51][52]

Cookie theft and session hijacking[edit]

Most websites use cookies as the only identifiers for user sessions, because other methods of identifying web users have limitations and vulnerabilities. If a website uses cookies as session identifiers, attackers can impersonate users’ requests by stealing a full set of victims’ cookies. From the web server's point of view, a request from an attacker then has the same authentication as the victim’s requests; thus the request is performed on behalf of the victim’s session.

Listed here are various scenarios of cookie theft and user session hijacking (even without stealing user cookies) which work with websites which rely solely on HTTP cookies for user identification.

Network eavesdropping[edit]



An attacker could use intercepted cookies to impersonate a user and perform a malicious task, such as transferring money out of the victim’s bank account.


Publishing false sub-domain – DNS cache poisoning[edit]

If an attacker is able to cause a DNS server to cache a fabricated DNS entry (called DNS cache poisoning), then this could allow the attacker to gain access to a user's cookies. For example, an attacker could use DNS cache poisoning to create a fabricated DNS entry of that points to the IP address of the attacker’s server. The attacker can then post an image URL from his own server (for example, Victims reading the attacker’s message would download this image from Since is a sub-domain of, victims' browsers would submit all cookies to the attacker’s server.

If an attacker is able to accomplish this, it is usually the fault of the Internet Service Providers for not properly securing their DNS servers. However, the severity of this attack can be lessened if the target website uses Secure cookies. In this case, the attacker would have the extra challenge[53] of obtaining the target website's SSL certificate from a Certificate Authority, since Secure cookies can only be transmitted over an encrypted connection. Without a matching SSL certificate, victims' browsers would display a warning message about the attacker's invalid certificate, which would help deter users from visiting the attacker's fraudulent website and sending the attacker their cookies.

Cross-site scripting – cookie theft[edit]

Main article: Cross-site scripting







Cross-site scripting – proxy request[edit]

In older versions of many browsers, there were security holes allowing attackers to script a proxy request by using the client-side XMLHttpRequest API. For example, a victim is reading an attacker’s posting on, and the attacker’s script is executed in the victim’s browser. The script generates a request to with the proxy server Since the request is for, all cookies will be sent along with the request, but routed through the attacker’s proxy server. Hence, the attacker would be able to harvest the victim’s cookies.

This attack would not work with Secure cookies, since they can only be transmitted over HTTPS connections, and the HTTPS protocol dictates end-to-end encryption (i.e. the information is encrypted on the user’s browser and decrypted on the destination server). In this case, the proxy server would only see the raw, encrypted bytes of the HTTP request.

Cross-site request forgery[edit]


<img src="">


Drawbacks of cookies[edit]


Inaccurate identification[edit]

If more than one browser is used on a computer, each usually has a separate storage area for cookies. Hence cookies do not identify a person, but a combination of a user account, a computer, and a web browser. Thus, anyone who uses multiple accounts, computers, or browsers has multiple sets of cookies.


Inconsistent state on client and server[edit]

The use of cookies may generate an inconsistency between the state of the client and the state as stored in the cookie. If the user acquires a cookie and then clicks the "Back" button of the browser, the state on the browser is generally not the same as before that acquisition. As an example, if the shopping cart of an online shop is built using cookies, the content of the cart may not change when the user goes back in the browser's history: if the user presses a button to add an item in the shopping cart and then clicks on the "Back" button, the item remains in the shopping cart. This might not be the intention of the user, who possibly wanted to undo the addition of the item. This can lead to unreliability, confusion, and bugs. Web developers should therefore be aware of this issue and implement measures to handle such situations.

Inconsistent support by devices[edit]

The problem with using mobile cookies is that most devices do not implement cookies; for example, Nokia only supports cookies on 60% of its devices, while Motorola only supports cookies on 45% of its phones.[56] In addition, some gateways and networks (Verizon, Alltel, and MetroPCS) strip cookies, while other networks simulate cookies on behalf of their mobile devices. There are also dramatic variations in the wireless markets around the world; for example, in the United Kingdom 94% of the devices support wireless cookies, while in the United States only 47% support them.

The support for cookies is greater in the Far East, where wireless devices are more commonly used to access the web. Mobile cookies is a practice already in place in Japan, so that whether watching a podcast, a video, TV, clicking on a loan calculator or a GPS map—on almost all wireless devices—cookies can be set for tracking and capturing wireless behaviors.[56]

Alternatives to cookies[edit]


IP address[edit]

Some users may be tracked based on the IP address of the computer requesting the page. The server knows the IP address of the computer running the browser or the proxy, if any is used, and could theoretically link a user's session to this IP address.


URL (query string)[edit]

A more precise technique is based on embedding information into URLs. The query string part of the URL is the one that is typically used for this purpose, but other parts can be used as well. The Java Servlet and PHP session mechanisms both use this method if cookies are not enabled.

This method consists of the web server appending query strings to the links of a web page it holds when sending it to a browser. When the user follows a link, the browser returns the attached query string to the server.

Query strings used in this way and cookies are very similar, both being arbitrary pieces of information chosen by the server and sent back by the browser. However, there are some differences: since a query string is part of a URL, if that URL is later reused, the same attached piece of information is sent to the server. For example, if the preferences of a user are encoded in the query string of a URL and the user sends this URL to another user by e-mail, those preferences will be used for that other user as well.

Moreover, even if the same user accesses the same page two times, there is no guarantee that the same query string is used in both views. For example, if the same user arrives to the same page but coming from a page internal to the site the first time and from an external search engine the second time, the relative query strings are typically different while the cookies would be the same.

Other drawbacks of query strings are related to security: storing data that identifies a session in a query string enables or simplifies session fixation attacks, referrer logging attacks and other security exploits. Transferring session identifiers as HTTP cookies is more secure.

Hidden form fields[edit]

Another form of session tracking is to use web forms with hidden fields. This technique is very similar to using URL query strings to hold the information and has many of the same advantages and drawbacks; and if the form is handled with the HTTP GET method, the fields actually become part of the URL the browser will send upon form submission. But most forms are handled with HTTP POST, which causes the form information, including the hidden fields, to be appended as extra input that is neither part of the URL, nor of a cookie.

This approach presents two advantages from the point of view of the tracker: first, having the tracking information placed in the HTML source and POST input rather than in the URL means it will not be noticed by the average user; second, the session information is not copied when the user copies the URL (to save the page on disk or send it via email, for example).[edit]

All current web browsers can store a fairly large amount of data (2–32 MB) via JavaScript using the DOM property This data can be used instead of session cookies and is also cross-domain. The technique can be coupled with JSON/JavaScript objects to store complex sets of session variables[57] on the client side.

The downside is that every separate window or tab will initially have an empty when opened. Furthermore can be used for tracking visitors across different websites, making it of concern for Internet privacy.

In some respects this can be more secure than cookies due to not involving the server, so it is not vulnerable to network cookie sniffing attacks. However if special measures are not taken to protect the data, it is vulnerable to other attacks because the data is available across different websites opened in the same window or tab.

HTTP authentication[edit]


Identifier for advertisers[edit]

Apple uses a tracking technique called "identifier for advertisers" (IDFA). This technique assigns a unique identifier to every user that buys an Apple iOS device (such as an iPhone or iPad). This identifier is then used by Apple's advertising network, iAd, to determine the ads that individuals are viewing and responding to.[58]


Because ETags are cached by the browser, and returned with subsequent requests for the same resource, a tracking server can simply repeat any ETag received from the browser to ensure an assigned ETag persists indefinitely (in a similar way to persistent cookies). Additional caching headers can also enhance the preservation of ETag data.

ETags may be flushable by clearing the browser cache (implementations vary).

Web Storage[edit]

Main article: Web storage


  • The HTML 5 standard (which most modern web browsers support to some extent) includes two types of web storage: local storage and session storage, which behave similarly to persistent cookies and session cookies respectively.
  • Internet Explorer supports persistent information [59] in the browser's history, favorites, in an XML store ("user data"), or directly within a Web page saved to disk.
  • Some web browser plugins include persistence mechanisms as well. For example, Flash has Local Shared Object and Silverlight has Isolated Storage.[60]


The browser cache can also be used to store information that can be used to track individual users. This technique takes advantage of the fact that the web browser will use resources stored within the cache instead of downloading them from the website when it determines that the cache already has the most up-to-date version of the resource. For example, a website could serve a JavaScript file that contains code which sets a unique identifier for the user (for example, var userId = 3243242;). After the user's initial visit, every time the user accesses the page, this file will be loaded from the cache instead of downloaded from the server. Thus, its content will never change.

Browser fingerprint[edit]

Main article: Device fingerprint


Basic web browser configuration information has long been collected by web analytics services in an effort to accurately measure real human web traffic and discount various forms of click fraud. With the assistance of client-side scripting languages, collection of much more esoteric parameters is possible.[61][62] Assimilation of such information into a single string comprises a device fingerprint. In 2010, EFF measured at least 18.1 bits of entropy possible from browser fingerprinting.[63] Canvas fingerprinting, a more recent technique, claims to add another 5.7 bits.

See also[edit]


  1. ^ "HTTP State Management Mechanism – Overview". IETF. April 2011. 
  2. ^ Penenberg, Adam; Cookie Monsters, Slate, November 7, 2005. "Cookies are not software. They can't be programmed, can't carry viruses, and can't unleash malware to go wilding through your hard drive."
  4. ^ "New net rules set to make cookies crumble". BBC. 2011-03-08. 
  5. ^ "Sen. Rockefeller: Get Ready for a Real Do-Not-Track Bill for Online Advertising". 2011-05-06. 
  6. ^ Vamosi, Robert (2008-04-14). "Gmail cookie stolen via Google Spreadsheets". 
  7. ^ Schwartz, John (2001-09-04). "Giving Web a Memory Cost Its Users Privacy". The New York Times. 
  8. ^ a b Kesan, Jey; and Shah, Rajiv ; Deconstructing Code,, chapter II.B (Netscape's cookies), Yale Journal of Law and Technology, 6, 277–389
  10. ^ "Press Release: Netscape Communications Offers New Network Navigator Free On The Internet". Archived from the original on 2006-12-07. Retrieved 2010-05-22. 
  11. ^ "Usenet Post by Marc Andreessen: Here it is, world!". 1994-10-13. Retrieved 2010-05-22. 
  12. ^ Hardmeier, Sandi (2005-08-25). "The history of Internet Explorer". Microsoft. Retrieved 2009-01-04. 
  13. ^ Jackson, T (1996-02-12). "This Bug in Your PC is a Smart Cookie". Financial Times. 
  14. ^ Microsoft Support Description of Persistent and Per-Session Cookies in Internet Explorer Article ID 223799, 2007
  15. ^ "Maintaining session state with cookies". Microsoft Developer Network. Retrieved 22 October 2012. 
  16. ^ Rouse, Margaret (September 2005). "Transient cookie (session cookie)". SearchSOA. TechTarget. Retrieved 22 October 2012. 
  17. ^ Böttiger, Arvid (2011). "HTTP-Only cookies - Brought to you by Internet Explorer 6". 
  18. ^ OWASP Browsers Supporting HttpOnly
  19. ^ a b c IETF HTTP State Management Mechanism – Apr, 2011 Obsoletes RFC 2965
  20. ^ "Third party domains". 
  21. ^ "Number of cookies". 
  22. ^ Mayer, Jonathan (19 August 2011). "Tracking the Trackers: Microsoft Advertising". The Center for Internet and Society. Retrieved 28 September 2011. 
  23. ^ Vijayan, Jaikumar. "Microsoft disables 'supercookies' used on visitors". Retrieved 23 November 2014. 
  24. ^ Peng, Weihong; Cisna, Jennifer (2000). "HTTP cookies - a promising technology". Proquest. Online Information Review. Retrieved 29 March 2013. 
  25. ^ Jim Manico quoting Daniel Stenberg, Real world cookie length limits
  26. ^ "Persistent client state HTTP cookies: Preliminary specification". Netscape. c. 1999. Archived from the original on 2007-08-05. 
  27. ^ RFC 2965 – HTTP State Management Mechanism (IETF)
  28. ^ "Cookie Property". MSDN. Microsoft. Retrieved 2009-01-04. 
  29. ^ Shannon, Ross (2007-02-26). "Cookies — set and retrieve information about your readers". HTMLSource. Retrieved 2009-01-04. 
  30. ^ "HTTP State Management Mechanism – The Path Attribute". IETF. March 2014. 
  31. ^ "RFC 6265 - HTTP State Management Mechanism – Domain matching". IETF. March 2014. 
  32. ^ "RFC 6265 - HTTP State Management Mechanism – The Domain Attribute". IETF. March 2014. 
  33. ^ "RFC 2109 - HTTP State Management Mechanism – Set-Cookie syntax". IETF. March 2014. 
  34. ^ HTTP State Management Mechanism
  35. ^ "Symantec Internet Security Threat Report: Trends for July–December 2007 (Executive Summary)" (PDF) XIII. Symantec Corp. April 2008. pp. 1–3. Retrieved May 11, 2008. 
  36. ^ Whalen, David (June 8, 2002). "The Unofficial Cookie FAQ v2.6". Cookie Central. Retrieved 2009-01-04. 
  37. ^ "3rd-Party Cookies, DOM Storage and Privacy". Matt Mastracci's blog. January 6, 2010. Retrieved 2010-09-20. 
  38. ^ "How to Manage Cookies in Internet Explorer 6". Microsoft. December 18, 2007. Retrieved 2009-01-04. 
  39. ^ "Clearing private data". Firefox Support Knowledge base. Mozilla. 16 September 2008. Retrieved 2009-01-04. 
  40. ^ "Clear Personal Information : Clear browsing data". Google Chrome Help. Google. Retrieved 2009-01-04. 
  41. ^ "Clear Personal Information: Delete cookies". Google Chrome Help. Google. Retrieved 2009-01-04. 
  42. ^ "Site Compatibility for Firefox 22", Mozilla Developer Network, 2013-04-11 
  43. ^ Miyazaki, Anthony D. (2008), “Online Privacy and the Disclosure of Cookie Use: Effects on Consumer Trust and Anticipated Patronage,” Journal of Public Policy & Marketing, 23 (Spring), 19–33
  44. ^ "CIA Caught Sneaking Cookies". CBS News. 2002-03-20. 
  45. ^ "Spy Agency Removes Illegal Tracking Files". New York Times. 2005-12-29. 
  46. ^ "EU Cookie Directive - Directive 2009/136/EC". JISC Legal Information. Retrieved 31 October 2012. 
  47. ^ a b c Privacy and Electronic Communications Regulations. Information Commissioner's Office. 2012. 
  48. ^ "Directive 95/46/EC of the European Parliament and of the Council of 24 October 1995 on the protection of individuals with regard to the processing of personal data and on the free movement of such data". 1995-11-23. pp. P. 0031–0050. Retrieved 31 October 2012. 
  49. ^ "New EU cookie law (e-Privacy Directive)". Retrieved 31 October 2012. 
  50. ^ "EU cookie law: stop whining and just get on with it". Retrieved 31 October 2012. 
  51. ^ a b "A Loophole Big Enough for a Cookie to Fit Through". Bits. The New York Times. Retrieved 31 January 2013. 
  52. ^ Pegoraro, Rob (July 17, 2005). "How to Block Tracking Cookies". Washington Post. p. F07. Retrieved 2009-01-04. 
  53. ^ Wired Hack Obtains 9 Bogus Certificates for Prominent Websites
  54. ^ Fielding, Roy (2000). "Fielding Dissertation: CHAPTER 6: Experience and Evaluation". Retrieved 2010-10-14. 
  55. ^ Tilkov, Stefan (July 2, 2008). "REST Anti-Patterns". InfoQ. Retrieved 2009-01-04. 
  57. ^ "". Retrieved 2010-05-22. 
  58. ^
  59. ^
  60. ^
  61. ^ "BrowserSpy". Retrieved 2010-01-28. 
  62. ^ "IE "default behaviors [sic]" browser information disclosure tests: clientCaps". Retrieved 2010-01-28. 
  63. ^ Eckersley, Peter (17 May 2010). "How Unique Is Your Web Browser?". Electronic Frontier Foundation. Retrieved 23 July 2014. 


External links[edit]