A third-party cookie is created by a website other than the site the user has opened. These can include advertisements and social media widgets, or tracking tools. If an external provider places a cookie in the browser while that page is open, it is known as a third-party cookie because it comes from a different website.
First-party cookies help websites remember login sessions, settings, and user preferences. Third-party cookies, however, belong to external sites and may be accessed when users visit webpages containing content from these services.
How Third-Party Cookies Work
When a user visits a website, the page may load resources from an external domain; these may include advertising scripts, embedded video players, social-sharing buttons, or analytics tools. When the browser requests content from one of those external domains, the external server may respond with a Set-Cookie header, placing a cookie in the user’s browser. That cookie is associated with the external domain, not with the site the user is on.
The next time the user visits any other site that uses the same external domain, the browser forwards the same cookie in the request. The external domain then recognizes the same cookie ID from multiple websites, which allows it to recognize the user and build a record of which sites they have visited. This is the mechanism behind cross-site tracking.
Per MDN, cookies are sent back to the same server that set them with later requests. In a third-party context, that server is a different domain from the one the user is actively browsing.
The SameSite Attribute and Third-Party Cookies
The SameSite attribute on the Set-Cookie header controls whether a cookie is sent with cross-site requests. It is the primary mechanism browsers use to manage third-party cookie behavior. It takes three possible values.
Strict means the cookie is only sent when the request originates from the same site that set it. It will not be sent along with requests triggered by content on other sites.
Lax allows the cookie to be sent on top-level navigations to the site that set it, such as when a user clicks a link to that site, but not on embedded cross-site requests.
None means the cookie is sent on all requests, including cross-site ones. This is required for a cookie to function as a third-party cookie in supporting browsers. Per MDN, a cookie set with SameSite=None must also include the Secure attribute, meaning it can only be sent over HTTPS.
If no SameSite attribute is specified, browsers currently default to treating the cookie as Lax.
Common Uses of Third-Party Cookies
Not all third-party cookies are used for tracking. Third-party cookies have a number of legitimate applications, including sharing user profile information across related domains, counting ad impressions, and collecting analytics data across different properties owned by the same organization.
Common legitimate uses include:
Cross-domain authentication: Services that operate across multiple subdomains or related domains use third-party cookies to maintain a user’s session without requiring them to log in separately on each domain.
Embedded media and functionality: Video players, maps, and other embedded tools may use cookies to remember user preferences such as playback quality or language settings.
Advertising measurement: Ad networks use third-party cookies to count how many times an ad was displayed or clicked across a campaign, without necessarily tracking individual browsing behavior in detail.
Analytics across related domains: Organizations that run multiple websites sometimes use third-party cookies to consolidate analytics data across those properties.
Third-Party Cookies and User Tracking
The same mechanism that allows legitimate cross-domain behavior also enables cross-site tracking. A third-party server that puts a cookie on multiple websites can create a complete picture of a user’s browsing habits over time, collecting information about what pages they visited, how often, and in what order. This data is used to build behavioral profiles for targeted advertising.
A third-party server can summarize a user’s browsing based on cookies sent to it when the same browser accesses multiple sites. This is one of the main challenges regarding privacy that has driven action and browser-level restrictions on third-party cookies.
How Browsers Handle Third-Party Cookies
Browser handling of third-party cookies varies significantly and has been changing over recent years.
Safari began restricting third-party cookies through Intelligent Tracking Prevention (ITP) in 2017. Since March 2020, Safari blocks all third-party cookies by default.
Firefox introduced Enhanced Tracking Protection in 2019, which blocks known third-party tracking cookies by default. Its current Total Cookie Protection system goes further by isolating cookies on a per-site basis, preventing any single third-party domain from tracking a user across multiple sites.
Brave blocks third-party cookies by default.
Chrome took a different path. Google announced plans in 2019 to phase out third-party cookie support, but reversed course in July 2024. In April 2025, Google confirmed it would keep third-party cookies available by default in Chrome’s standard browsing mode and dropped plans for a user-facing choice prompt. As of late 2026, Chrome continues to allow third-party cookies in regular browsing, though they are blocked in Incognito mode.
Regulatory Requirements
Several major data protection regulations directly address the use of cookies, including third-party cookies. As noted by MDN, relevant legislation includes the General Data Protection Regulation (GDPR) in the European Union, the ePrivacy Directive in the EU, and the California Consumer Privacy Act (CCPA).
These regulations generally require websites to inform users that cookies are in use, give users the ability to opt out of non-essential cookies, and allow users to access core site functionality without accepting tracking cookies.
Websites serving users in these jurisdictions are expected to comply regardless of where the website itself is hosted.