Bug 12325 - Cookies inconsistently saved or is caching previous setting even though cookie shows current setting
Summary: Cookies inconsistently saved or is caching previous setting even though cooki...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: Mac (PowerPC) OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://test.nationalsalute.com/media_...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-18 13:01 PST by Kevin M. Dean
Modified: 2008-11-28 13:48 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin M. Dean 2007-01-18 13:01:35 PST
I have a site I'm working on which has some user options that set and read in cookies.

If you go to the above page in Safari or Webkit and select the Site Options button at the very bottom you can adjust 2 features. The most noticeable is to set both to off or both to on when changing them.

What is happening is if you make the adjustment and immediately quit and relaunch the browser, quite a bit of the time if not all the time, the cookie has reverted to it's previous setting. I've even had the cookies window open and watch the cookie values change to 0 for each setting... then restart and the cookies are back to 1. This doesn't happen when I do the same thing in Firefox or IE.

The cookies seem to stand a better chance of staying changed if just after changing the options I proceed to browse to other pages in the site. That seems to lock it in more. It seems a refresh isn't enough... which is what I do to the parent window to immediately show that changes that have been made. It seems that it prefers some manual browsing.

None of this really makes sense since if the cookie is set, it should stay that way unless otherwise specified.
Comment 1 David Kilzer (:ddkilzer) 2007-01-18 13:52:55 PST
Kevin, what domain are you using when setting the cookies?  If it's ".nationalsalute.com", then this is a duplicate of Bug 3512.

Comment 2 Kevin M. Dean 2007-01-18 14:02:40 PST
I'm not setting it to a specific domain since this client has a lot of different domains that all point to the same site so I need the cookies to work relative to what domain they came in from (but hey, maybe I'm unaware of the proper way to do it).

I'm not sure it's the same problem as the other bug since it appears to read in the cookie and set the cookie. The problem I'm seeing is I can have the cookie window open and see the values change for the cookies and then restart Safari/Webkit and the values have changed back to their previous state as if the cookie information was stored in some cache that didn't fully update until I proceed to browse other pages of the site.
Comment 3 Alexey Proskuryakov 2007-04-25 05:48:25 PDT
Could it be that cookies are only written to disk periodically? AFAIK, it is a common problem with application preferences in OS X.
Comment 4 Alexey Proskuryakov 2008-11-28 13:48:27 PST
The test page is no longer available (it asks for password). In any case, WebKit doesn't implement cookie handling, so any such bugs should be filed to Apple via <http://bugreport.apple.com>.

Sorry that it took so long.