• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Delay in NSHTTPCookieStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Delay in NSHTTPCookieStorage


  • Subject: Delay in NSHTTPCookieStorage
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 1 Apr 2007 14:39:34 -0700

I've written a function which logs the user out of Google by synchronously sending an HTTPS logout to google.com. After a short time delay, it then opens a google.com web page in Safari. In order to get the desired web page, I find that the delay must be 4 seconds or more. If the delay is less than 4 seconds, Safari gets the wrong page, indicating that the user is still logged in to Google.

I can see from the result of [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies] that the two Google session cookies are gone as soon as my synchronous HTTP logout HTTP returns from Google. So, why do I have to wait 4 seconds? I can understand that Google probably has 10,000 servers and it may take some time for the session to be deleted on their end. But, I believe it takes two to tango, therefore Safari must be sending the already-deleted cookie.

My hypothesis is that Safari must cache cookies until it receives an NSHTTPCookieManagerCookiesChangedNotification, which I know from experiments on my own app can take several seconds.

Does anyone agree with this? And, of course, the more important question is: How much time delay do I need to be "safe", or is there a better indication. Would it be safe to register for NSHTTPCookieManagerCookiesChangedNotification myself and end the delay when I get it?

Sincerely,

Jerry Krinock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Delay in NSHTTPCookieStorage
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Setting HTTP Status Code/Description after CFHTTPMessageCreateEmpty
  • Next by Date: Re: Setting HTTP Status Code/Description after CFHTTPMessageCreateEmpty
  • Previous by thread: Re: Setting HTTP Status Code/Description after CFHTTPMessageCreateEmpty
  • Next by thread: Re: Delay in NSHTTPCookieStorage
  • Index(es):
    • Date
    • Thread