What are cookies in web browser?
Types of cookies in web browser
Browser cookies from a web development perspective
Cookie management strategies
How do different web browsers handle cookies?
Google Chrome
First-party cookies
Third-party cookies
Privacy features
Privacy Sandbox
Google is developing a set of technologies under the Privacy Sandbox initiative to reduce cross-site tracking while still supporting advertising use cases. This includes:
- Topics API: Assigns interest-based categories to users based on browsing activity without revealing exact site history.
- Attribution Reporting API: Allows for ad conversion measurement without third-party cookies.
- Protected Audience API: Supports remarketing and interest-based ads without user-level identifiers.
These APIs are intended to provide advertisers with alternatives while improving user privacy compared to traditional tracking methods.
Security features
Chrome enforces modern cookie handling rules for better security:
- SameSite attribute is applied by default to cookies that lack an explicit value, treating them as SameSite=Lax. This limits how cookies are sent in cross-site requests.
- Secure flag is required for cookies set with SameSite=None, ensuring they are only transmitted over HTTPS.
- HttpOnly flag is supported, which prevents cookies from being accessed through JavaScript, reducing exposure to cross-site scripting (XSS) attacks.
User controls
Mozilla Firefox
First-party cookies
Third-party cookies
Privacy features
Enhanced Tracking Protection (ETP)
Firefox offers three ETP modes to control tracking and cookie behaviour:
- Standard (default): Blocks known tracking cookies, social media trackers, cryptominers, and fingerprinting scripts. Most websites will continue to work normally.
- Strict: Blocks all third-party cookies, including those not classified as trackers. This provides stronger privacy but may cause some websites to break.
- Custom: Let users choose exactly what to block—cookies, trackers, fingerprinting, and more—for full control.
Total Cookie Protection
Isolates cookies per website
Each website gets its own "cookie jar", preventing cross-site tracking—even if the cookies themselves are allowed. This feature is enabled by default in private browsing and is rolling out to standard mode users.
User controls
Apple Safari
Privacy features
Intelligent Tracking Prevention (ITP)
Safari’s ITP is designed to limit tracking across the web. Key features include:
- Detection of cross-site trackers using machine learning.
- Automatic blocking or restriction of cookies from classified trackers.
- Expiration limits for cookies even in a first-party context—e.g., cookies may be capped at 7 days or less, depending on tracking behavior.
- No reliance on external blocklists—ITP works independently based on user activity.
These measures make Safari one of the most privacy-focused browsers in mainstream use.
User Controls
Safari offers several cookie and privacy management options:
- Cookie preferences can be adjusted under Safari > Settings (or Preferences) > Privacy, where users can:
- Block all cookies.
- Allow cookies only from the current site.
- Allow cookies only from visited websites.
- Allow all cookies.
- Block all cookies.
- Remove stored cookies and data: Users can view and remove individual or all site cookies and stored data through the Details option.
Do Not Track setting: Safari allows users to request that websites not track them, though compliance depends on the site.
Note: Blocking all cookies is possible but not recommended, as it may cause websites to malfunction or prevent logins from working correctly.
Microsoft Edge
First-party cookies
Allowed by default
Microsoft Edge allows first-party cookies, which are created by the websites the users visit directly. These cookies store login information, preferences, and other data to personalise and maintain the browsing experience.
Third-party cookies
Allowed by default, with optional blocking
Edge permits third-party cookies by default. These cookies, often used by advertisers or embedded services, can track browsing activity across different sites. Users can block them through Edge’s built-in tracking prevention settings.
Privacy features
Tracking Prevention Levels
Edge includes three levels of tracking prevention to give users more control over their privacy:
- Basic: Allows most cookies and trackers. This level is designed to maximise website compatibility while offering minimal privacy protection.
- Balanced (default setting): Blocks trackers from websites the user hasn't interacted with. It maintains functionality while reducing cross-site tracking.
- Strict: Blocks most third-party cookies and known trackers. This provides the highest level of privacy but may affect how some websites function.
These levels allow users to tailor privacy protection based on their browsing needs.
Brave
First-party cookies
Allowed by default
Brave allows first-party cookies, which are set by the website the users are currently visiting. These cookies help websites remember user login status, preferences, and other on-site activities.
Third-party cookies
Blocked by default
Brave blocks third-party cookies automatically. These cookies are usually placed by advertisers or third-party services and are commonly used for cross-site tracking. Users can adjust these settings to allow or block cookies based on their preferences.
Privacy features
Brave Shields
Brave includes a built-in feature called Shields that enhances user privacy and security. Shields automatically:
- Block ads and trackers
- Block third-party cookies
- Prevent fingerprinting
- Upgrade connections to HTTPS when possible
These protections are active by default and can be customised globally or on a per-site basis.
Cookie control options
Brave gives users several ways to control how cookies behave:
- Block all cookies: Prevents all websites from storing cookies on the user's device.
- Block only third-party cookies: Allows first-party cookies but blocks cross-site tracking.
- Allow all cookies: Permits all cookies, including third-party ones.
Users can manage these settings from the browser’s Shields panel or through system preferences.
User controls
Brave offers a range of cookie management tools:
- Clear cookies on exit: Automatically deletes cookies each time the browser is closed.
- Manual cookie clearing: Accessible through the menu under Settings> Additional settings > Privacy and Security > Site and shields settings > Cookies and site data.
- Site-specific controls: Users can allow or block cookies for individual websites by clicking the lock icon in the address bar and selecting ‘Site settings’.
- Import and export settings: Cookie preferences can be transferred between devices using Brave’s import/export feature under ‘Privacy and security’.
DuckDuckGo
First-party cookies
Minimally used and only for non-personal settings
DuckDuckGo sets non-personal first-party cookies solely to store anonymous browser settings (such as region or theme). These cookies are optional and not used for tracking. Users can bypass cookies entirely by using URL parameters or the Cloud Save feature.
Third-party cookies
Blocked by default
DuckDuckGo blocks third-party cookies through its browser and extensions. These cookies, typically used for advertising and cross-site tracking, are not permitted unless explicitly allowed by the user.
Privacy features
Built-in tracking protection
DuckDuckGo offers extensive tracking protection in both its browser and browser extensions:
- Blocks third-party trackers from companies like Google and Facebook
- Blocks tracking cookies and fingerprinting techniques
- Does not track search activity—search queries are not logged or linked to user identity
- Blocks email trackers through its Email Protection tool
- Blocks app trackers on Android via App Tracking Protection (currently in beta)
Cookie pop-up blocking
The browser includes a built-in feature that hides cookie consent pop-ups on many websites, removing friction while still respecting user privacy preferences.
Burn feature
The Fire Button allows users to instantly clear all cookies, browsing data, and open tabs with a single click.
User controls
DuckDuckGo offers user-friendly privacy and cookie controls:
- Browser-wide cookie blocking is enabled by default
- Per-site cookie permissions are customisable through browser settings
- Email Protection forwards messages to users while stripping out trackers
- Search preferences can be stored via non-personal cookies, URL parameters, or Cloud Save for syncing across devices
DuckDuckGo does not collect or store any personal data by default and avoids building behavioural profiles for advertising. Its approach to cookies is minimal, transparent, and focused entirely on user control.
Quick comparison of cookies in web browser
| Browser | First-party cookies | Third-party cookies | Privacy features | User controls |
|---|---|---|---|---|
| Google Chrome | Yes | Yes | Privacy Sandbox APIs (Topics, Attribution, Audience) | Block all/third-party cookies |
| Mozilla Firefox | Yes | Partial block | Enhanced Tracking Protection (Standard, Strict, Custom) | Clear all/specific cookies |
| Safari | Yes (only from visited websites) | Blocked | Intelligent Tracking Prevention (ITP) | Allow/block all or visited sites |
| Microsoft Edge | Yes | Yes (user can block) | Tracking Prevention Levels (Basic, Balanced, Strict) | Tracking prevention dashboard |
| Brave | Yes | Blocked | Brave Shields | Block all/3rd-party/allow all |
| DuckDuckGo | Minimally used for non-personal settings | Blocked | Built-in tracker blocking | Cookie blocking on by default |
Key takeaways
- First-party cookies are allowed by default in all major browsers to support core site functions like login and preferences.
- Third-party cookies:
- Allowed by default: Chrome, Edge
- Blocked by default: Brave, DuckDuckGo
- Partially blocked: Firefox (known trackers), Safari (via ITP)
- Privacy-first browsers (Brave, DuckDuckGo, Firefox) offer strong default protections—blocking trackers, fingerprinting, and enforcing cookie isolation.
- Chrome still allows third-party cookies but is transitioning to Privacy Sandbox APIs for a cookie-free tracking model.
- User controls are available in all browsers, letting users block, allow, or clear cookies globally or per site.
- Developers must account for browser differences in cookie handling to ensure privacy compliance and a consistent user experience.
Data privacy regulations and implications
Regulations like the General Data Protection Regulation (GDPR) and California Privacy Rights Act (CPRA) dictate how cookies can be used. They require:
- Transparency in data collection
- Clear user consent mechanisms
- Easy options for users to manage preferences
These laws shape how browsers and websites handle cookies, ensuring users maintain control over their data.
GDPR and cookie consent
The GDPR requires websites to obtain clear, affirmative consent before setting any non-essential cookies. This typically means:
- Displaying a cookie banner before cookies are placed
- Explaining cookie types and purposes
- Providing options to accept, reject, or customise consent



