Third-party cookies are
HTTP cookie
HTTP cookie (also called web cookie, Internet cookie, browser cookie, or simply cookie) is a small block of data (computing), data created by a web server while a user (computing), user is browsing a website and placed on the user's computer o ...
s which are used principally for
web tracking
Web tracking is the practice by which operators of websites and third parties collect, store and share information about visitors' activities on the World Wide Web. Analysis of a user's behaviour may be used to provide content that enables the op ...
as part of the
web advertising
Online advertising, also known as online marketing, Internet advertising, digital advertising or web advertising, is a form of marketing and advertising that uses the Internet to promote products and services to audiences and platform users. ...
ecosystem.
While HTTP cookies are normally 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. Third-party cookies are the cookies that are set during retrieval of these components.
A third-party cookie thus can belong to a domain different from the one shown in the address bar, yet can still potentially be correlated to the content of the main web page, allowing the tracking of user visits across multiple websites.
This sort of cookie typically appears when web pages feature content from external websites, such as
banner advertisements. Although not originally intended for this purpose, the existence of third party cookies opened up the potential for
web tracking
Web tracking is the practice by which operators of websites and third parties collect, store and share information about visitors' activities on the World Wide Web. Analysis of a user's behaviour may be used to provide content that enables the op ...
of a user's browsing history and is used by advertisers to
serve relevant advertisements to each user. Third-party cookies are widely viewed as a threat to the privacy and anonymity of web users.
, all major
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
vendors had plans to phase out third-party cookies. This decision was reversed for Google Chrome in July 2024.
Mechanism

As an example, suppose a user visits
www.example.org
. This website contains an advertisement from
ad.foxytracking.com
, which, when downloaded, sets a cookie belonging to the advertisement's domain (
ad.foxytracking.com
). Then, the user visits another website,
www.foo.com
, which also contains an advertisement from
ad.foxytracking.com
and sets a cookie belonging to that domain (
ad.foxytracking.com
). 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, through the use of the
HTTP referer
In HTTP, "" (a misspelling of "Referrer") is an optional HTTP header field that identifies the address of the web page (i.e., the URI or IRI) from which the resource has been requested. By checking the referrer, the server providing the new web ...
header field.
, some websites were setting cookies readable for over 100 third-party domains.
On average, a single website was setting 10 cookies, with a maximum number of cookies (first- and third-party) reaching over 800.
The older standards for cookies, RFC 2109
and RFC 2965,
recommend that browsers should protect user privacy and not allow sharing of cookies between servers by default. However, a newer standard, RFC 6265,
released in April 2011 explicitly allowed user agents to implement whichever third-party cookie policy they wish, and until the late 1990s allowing third party cookies was the default policy implemented by most major browser vendors.
Privacy law and cookie consent dialogs
While useful for advertisers, web tracking is widely seen as a threat to personal privacy. This prompted the creation of laws against tracking without user consent, the most notable of which is the European
GDPR
The General Data Protection Regulation (Regulation (EU) 2016/679), abbreviated GDPR, is a European Union regulation on information privacy in the European Union (EU) and the European Economic Area (EEA). The GDPR is an important component of ...
.
This led to the creation of "cookie consent" dialogs, which rapidly became a standard feature across advertising-funded (and many other) websites, and notable for their use of
dark pattern
A dark pattern (also known as a "deceptive design pattern") is a user interface that has been carefully crafted to trick users into doing things, such as buying overpriced insurance with their purchase or signing up for recurring bills. User exp ...
s to attempt to force users to allow tracking by making it hard for them to refuse to grant consent.
Some websites also responded by simply geoblocking users from countries with privacy-friendly laws.
Blocking third-party cookies
Most modern web browsers contain
privacy settings
Privacy settings are the part of a social networking website, web browser, or other piece of software, that allows a user to control who sees information about the user. With the growing prevalence of social networking services, opportunities for p ...
that can
block
Block or blocked may refer to:
Arts, entertainment and media Broadcasting
* Block programming, the result of a programming strategy in broadcasting
* W242BX, a radio station licensed to Greenville, South Carolina, United States known as ''96.3 ...
third-party cookies, and some now block all third-party cookies by default - as of July 2020, such browsers include
Apple Safari
Safari is a web browser developed by Apple Inc., Apple. It is built into several of List of Apple operating systems, Apple's operating systems, including macOS, iOS, iPadOS, and visionOS, and uses Apple's open-source software, open-source bro ...
,
Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curr ...
,
and
Brave.
Safari allows embedded sites to use the Storage Access API to request permission to request first-party cookies when the user interacts with them. In May 2020,
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
83 introduced new features to block third-party cookies by default in its Incognito mode for private browsing, making blocking optional during normal browsing. The same update also added an option to block first-party cookies.
Google planned to start blocking third-party cookies by default in late 2024, and in January 2024 started this process with a pilot scheme in which blocking has been implemented for 1% of all Chrome users.
Replacements
Since third-party-cookie-based web tracking was an essential part of the existing web advertising ecosystem, multiple proposals are being implemented to try to replace it.
Google proposes the use of
browser-based interest targeting, in which users' interests can be recorded locally by the browser, and then signalled to advertising servers without directly revealing the user's identity. Google's
Privacy Sandbox is one such implementation.
Other approaches include the use of
browser fingerprinting to track users across sites, which is generally viewed as being as bad a threat to privacy as third-party cookies. There are also concerns that interest-based tracking may itself be abused to fingerprint users.
Circumvention of blocking of third party cookies
A number of methods exists for circumventing the blocking of third-party cookies. One is for the operators of websites to point a DNS name within the site's own domain at an advertiser's server, thus in effect making cookies set on that server first-party cookies from the viewpoint of the browser while still providing a third party with control over the cookie information.
Another approach is for the website operator to
proxy traffic from the client to the tracking service's servers. As this would easily allow the website operator to serve false information to the tracking service, this is unlikely to be widely adopted.
References
{{Web browsers
Hypertext Transfer Protocol headers
Internet privacy
Tracking