Especially for the iPhone
Asked
Active
Viewed 1.3k times
1 Answers
4
This works in IE, Chrome and Safari (which should be the same as iPhone):
if (navigator.cookieEnabled)
alert("ON");
else
alert("OFF");
EDIT: Since nvl decided to take my answer and not check into it I thought I should. Tested it on all the browsers I could find and seems to work just fine.

Kelsey
- 47,246
- 16
- 124
- 162
-
I relied on you! :P and I think you are more worried with my taking your answer (i was trying to make my answer cross-browser compliant, i checked only for Chrome and FF) than actually checking, so I delete it. – N 1.1 Mar 24 '10 at 23:32
-
3`cookieEnabled` is really unreliable. See eg. http://stackoverflow.com/questions/2167310/how-to-show-a-message-only-if-cookies-are-disabled-in-browser/2167462#2167462 – bobince Mar 24 '10 at 23:36