This indicates whether your browser accepts cookies.
The navigator.cookieEnabled property is a read-only boolean that indicates whether HTTP cookies are enabled in the browser. This simple yes/no value reveals:
HTTP cookies were invented by Lou Montulli at Netscape in 1994 to solve a fundamental problem: the web is stateless. Each HTTP request is independent, with no memory of previous requests. Cookies provided a way for websites to "remember" users across page loads.
Cookies are small text files (typically 4KB or less) that websites store on your computer. They consist of:
session_id=abc123)Without cookies, websites couldn't:
navigator.cookieEnabled PropertyThis property was added to help websites detect whether cookies will work before attempting to use them. A value of false means:
This property only checks if cookies are theoretically enabled. It doesn't test if cookies actually workβsome browsers return true even when blocking third-party cookies.
true (Most Common)Meaning: The browser accepts cookies from websites
Typical for:
false (Rare)Meaning: The browser is configured to reject cookies
Typical for:
Modern browsers have complex cookie policies:
| Scenario | cookieEnabled Value | Actual Behavior |
|---|---|---|
| Normal Mode | true |
All cookies accepted |
| Block Third-Party | true |
Only first-party cookies work |
| Private/Incognito | true |
Cookies work but deleted when closed |
| Cookies Disabled | false |
No cookies accepted at all |
Use case: Keeping users logged in as they navigate your website
// Check if cookies work before setting session cookie
if (navigator.cookieEnabled) {
document.cookie = "session_token=xyz123; Secure; HttpOnly";
} else {
alert("Please enable cookies to stay logged in");
}Use case: Remembering items users add to their cart across sessions
Use case: Saving settings like language, theme, or layout preferences
Use case: Understanding how users interact with your site
Use case: Preventing Cross-Site Request Forgery attacks
Security tokens stored in cookies verify that form submissions come from your site, not malicious third parties.
| Browser | Default Setting | Third-Party Cookies |
|---|---|---|
| Chrome | Enabled | Allowed (but phasing out by 2024-2025) |
| Firefox | Enabled | Blocked by default (Enhanced Tracking Protection) |
| Safari | Enabled | Blocked (Intelligent Tracking Prevention) |
| Edge | Enabled | Follows Chrome's timeline |
Mobile browsers generally follow the same cookie policies as their desktop counterparts, but:
Browsers like Brave and Tor have unique cookie handling:
While the cookieEnabled property itself is just a boolean, it reveals privacy posture and enables widespread tracking through cookies.
What it is: Tracking by the website you're visiting
Privacy impact: MODERATE - The site knows what you do on their site
Example: Amazon remembers your browsing history and shows "Recently Viewed Items"
What it is: Tracking by advertisers/analytics across multiple websites
Privacy impact: HIGH - Creates detailed profile of your browsing habits
Example: You look at shoes on Site A, then see shoe ads on Sites B, C, and D
How it works:
ad-network.comad-network.com sets a cookie with unique ID: user=12345ad-network.comad-network.com reads cookie user=12345 and knows it's youAdvertising networks use cookies to build profiles containing:
If you log into services (Google, Facebook) on multiple devices, they can link your cookie data across phones, tablets, and computers to create unified profiles.
Cookie data is often sold to data brokers who combine it with other information (credit reports, public records, etc.) to create comprehensive dossiers.
Even the setting cookieEnabled = false is a fingerprinting signal:
Chrome: Settings β Privacy and security β Cookies and other site data β Block all cookies
Firefox: Settings β Privacy & Security β Custom β Cookies β Block all cookies
Safari: Preferences β Privacy β Block all cookies
Disabling all cookies will break login functionality on most sites, shopping carts, and many interactive features. This is rarely practical for daily browsing.
This blocks tracking cookies while allowing legitimate first-party cookies:
Chrome: Settings β Privacy and security β Block third-party cookies
Firefox: Enabled by default (Standard or Strict tracking protection)
Safari: Enabled by default (Intelligent Tracking Prevention)
Blocking third-party cookies prevents most cross-site tracking while keeping websites functional. This is the recommended setting for most users.
Laws like GDPR (EU) and CCPA (California) require websites to ask permission before setting non-essential cookies. Tools to manage this:
Modern web standards provide privacy-friendly alternatives: