Page 1 of 1

Opera and Safari deletes cookie after restart or quit

Posted: Thu Dec 20, 2007 12:41 am
by parka
(I'm using Mac OS 10.5.1, Opera 9.25, Safari 3.04)

Hi all,

I'm having some problems with Opera/Safari deleting cookies when I quit Opera/Safari.
When opening up the browser's preference to show cookies I can see that the cookies are set.
When I restart the browser, the cookies are gone.

I don't have this problem with Firefox though.

--

It seems that Opera/Safari didn't delete cookies from DevNetwork Forums when I restart.
So I figure there must be some problems with my coding and not actually a browser problem.

Any ideas what could have happened?

Posted: Thu Dec 20, 2007 12:56 am
by s.dot
Got some code to show us? :P

Most likely you are using non-persisting cookies.

Posted: Thu Dec 20, 2007 3:13 am
by parka
I just used the very basic code as below:

Code: Select all

setCookie('cookiename', 'cookievalue', time() + 603600, '/')
The cookie seems to be alright in Opera when it was set.

Image

But when I quit Opera, I can't read it anymore, via:

Code: Select all

isset($_COOKIE['cookiename'])
It gave a false saying it's not set. And when I open Opera preferences, it verifies that. Similar problem with Safari.

But Firefox seems alright. Haven't tested with IE yet.