Latest web development tutorials

Navigator cookieEnabled property

Navigator Object Reference Navigator Objects

Definition and Usage

cookieEnabled property returns a Boolean value, if enabled browser cookie, the property value is true. If you disable the cookie, the value is false.

grammar

navigator.cookieEnabled


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support cookieEnabled property


Examples

Examples

Determine whether your browser cookies enabled:

<script>

document.write("是否启用 Cookie: " + navigator.cookieEnabled);

</script>

Examples of the above output:


try it"


Examples s

More examples

This example contains all the properties of navigator.


Navigator Object Reference Navigator Objects