Visit Mozilla.org

DOM:window.navigator.cookieEnabled

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

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

[edit] Syntax

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

[edit] Example

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

[edit] Notes

Due to bug 230350, cookieEnabled may return the wrong result in Gecko-based applications.

[edit] Specification

DOM Level 0. Not part of any standard.