navigator.cookieEnabled returns a Boolean value that indicates whether cookies are enabled or not. The property is read-only.


var cookieEnabled = navigator.cookieEnabled;
  • cookieEnabled is a Boolean: true or false.


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


Specification Status Comment
HTML Living Standard
The definition of 'Navigator.cookieEnabled' in that specification.
Living Standard Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support59 Yes11 Yes Yes Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support5959 Yes41 Yes Yes ?

1. Prior to Firefox 8, navigator.cookieEnabled would report the wrong result if a site exception was in place for the page on which the check was performed. This has been fixed.

Document Tags and Contributors

Last updated by: connorshea,