Your Search Results

    window.navigator.cookieEnabled Redirect 1

    « DOM Reference


    Returns a Boolean value indicating whether cookies are enabled or not (read-only).


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


    if (!navigator.cookieEnabled) { 
      // let the user know that enabling cookies makes the web page much more useful

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support Yes 1.0 (1.7 or earlier) ? ? ?
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? 1.0 (1.0) ? ? ?

    Gecko notes

    Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), window.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.


    DOM Level 0. Not part of any standard.

    Document Tags and Contributors

    Contributors to this page: Sheppy
    Last updated by: Sheppy,
    Hide Sidebar