Cookie Enabled | JavaScriptSource

Cookie Enabled

JavaScriptSource Staff Oct 26, 2005

General

This script checks to see if the user has cookies enabled in his browser. If not, it displays an alert window letting them know your site is using cookies.


Notes

  • Created by: Chris
  • Web Site:
  • Posted: October 26, 2005

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: cookieEnabled.js


Head

Paste this code into the HEAD section of your HTML document.


Leave a Response

(3 comments)

You will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Nov 6, 2007

I Check if the cookie is enabled or not ,then how i write a message into a labelbox

Sreejith Oct 4, 2007

Hi,[p] How this code will work in IE6 and FireFox?[br /]\[br /]I tried it out in IE6 in windows XP. First I disable my cookies then run this code it didnot showed me alert box.[p]Bye.

saqib Dec 19, 2006