Cookie Enabled | JavaScriptSource

Cookie Enabled

JavaScriptSource Staff Oct 26, 2005


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.


  • 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


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

Leave a Response


The cookies in my phone was I hope now the cookies will be enabled

William May 6, 2013

You will need to submit your question to the [a href=""]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