VOOZH about

URL: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/cookieEnabled

⇱ Navigator: cookieEnabled property - Web APIs | MDN


Navigator: cookieEnabled property

navigator.cookieEnabled returns a Boolean value that indicates whether cookies are enabled or not.

The property is read-only.

Value

A boolean.

Note: Web browsers may prevent writing certain cookies in certain scenarios. For example, Chrome-based browsers, as well as some experimental version of Firefox, does not allow creating cookies with SameSite=None attribute, unless they are created over HTTPS and with Secure attribute.

Examples

js
if (!navigator.cookieEnabled) {
 // The browser does not support or is blocking cookies from being set.
}

Specifications

Specification
HTML
# dom-navigator-cookieenabled-dev

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.