Mozilla.com

  1. MDC
  2. Main Page
  3. DOM
  4. window.navigator.cookieEnabled
Redirected from En/Navigator.cookieEnabled

window.navigator.cookieEnabled

« Gecko DOM Reference

Summary

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

Syntax

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

Example

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

Notes

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

Specification

DOM Level 0. Not part of any standard.

Languages

Page last modified 17:01, 13 Nov 2007 by Mgjbot

Files (0)