Click to See Complete Forum and Search --> : Simple? So I thought ...


paulm
08-22-2003, 10:04 PM
I thought tihis should work a simple cookies detection, I know it's crude and only woks for NN6+ and IE4+ but I'm puzzled why it's not working in IE6 when I test with IE6, it always returns cookies enabled even when they are disabled?

<script language="JavaScript" type="text/JavaScript">
<!---
if (navigator.cookieEnabled) {
alert("Cookies are enabled")
} else {
alert("Cookies are disabled")
}
--></script>

Any nice Javascript guru tell me why ? .. I'm puzzled ..

Thanks .............

AdamBrill
08-22-2003, 10:30 PM
Well, I just did some simple tests and it looks like you can't disable cookies in IE. Although there is the place where you can click "Block all cookies", I could still write and read a cookie after I had "blocked" all cookies...

paulm
08-22-2003, 10:35 PM
Curious ....... can't be the case surely :eek:

AdamBrill
08-22-2003, 10:41 PM
I found it hard to believe, too, but it is hard not to believe it when the browser just wrote and read a cookie while cookies were set to off. ;) Does anyone else have any extra information on this??

AdamBrill
08-23-2003, 02:01 PM
Ok, some new info. ;) If you turn cookies off in IE, it will still write them, but you can only read them until you close the browser. So, they are basically useless, but it still sets them, thus causing the "cookies on" script to always work...

paulm
08-23-2003, 07:38 PM
Arer you saying that it should work after IE6 has been closed and relaunched?

AdamBrill
08-23-2003, 08:45 PM
They work basically like sessions. You can read the cookie, but only until you close the browser. Once you've closed the browser, it deletes the cookies and you can't read them anymore...

Zero-x252
08-23-2003, 10:00 PM
Its Bill Gates' Evil plot to create a code via the MS webstie that overrides that protocol of IE and then simply creates an infinite loop in a cookie and crash you browser forever...