Opera and Safari deletes cookie after restart or quit

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
parka
Forum Commoner
Posts: 52
Joined: Mon Feb 26, 2007 6:48 am

Opera and Safari deletes cookie after restart or quit

Post 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?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Got some code to show us? :P

Most likely you are using non-persisting cookies.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
parka
Forum Commoner
Posts: 52
Joined: Mon Feb 26, 2007 6:48 am

Post 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.
Post Reply