Page 1 of 1

Help needed: why this cookie is not working on IE?

Posted: Fri Aug 13, 2004 7:31 am
by scheiner
Hi All,

I have a problem setting cookies . I hope some of you will be able to help me...

look at this link:
http://www.my-robot-store.com/testcookie.php

in that link there is a cookie that its session is limited to only 3 second (the code of the script can be viewed here: http://www.my-robot-store.com/testcookie.txt)

the script increase the cookie by one, for each refresh. of course, since the cookie is limited to 3 second it should be restarted if it is not used for more than 3 second. but as you can see, you can wait few minutes, refresh and the cookie is still there (the number is increase) . The thing is that the script works fine on with Mozilla But not with Internet Explorer (the cookie is not set when using IE6) .

If any of you have any idea how to change the code in order to it to work the same for IE and Mozilla, please let me know

Tnx,
Uri

Posted: Fri Aug 13, 2004 11:41 am
by feyd
the likely reason why the session isn't deleted quickly is the garbage collection probability is set real low. It works fine on my IE, btw. Although I think you going to want to set the lifetime for garbage collection, instead of the cookies expire time (which is what you are setting now)

Posted: Fri Aug 13, 2004 12:18 pm
by scheiner
I think the reason that it is happening is the timezone difference. the time is it setting the cookie on my client is not the same as the server's time. I think you are in the same zone as the server and that is why it is working fine...,

Anyway, I'll be very interested in checking your suggestion (btw- does it explain why it works diffrence in IE and Mozilla). can you explain how to do it?

Tnx,
Uri

Posted: Fri Aug 13, 2004 12:26 pm
by feyd
I'm 7 hours off from the server.. it's definitely not a timezone thing.. About the only thing that stands out a bit, is the server's time is offset from mine (when adjusted to the same timezone).. I don't think IE is setting it's internal timing clock to the server's time being reported.. so the actual death takes a little longer that's all..

Posted: Fri Aug 13, 2004 1:06 pm
by scheiner
ok. if so, I will check it with more patience and see if it works.

Tnx!!
Uri