Safari is losing it's cookies.  Again.  Or Still.

I've spent countless hours trying to debug our helpdesk software, only to finally reach the conclusion that Safari was simply losing it's cookies.  Then I found a thread here, "Safari keeps logging me out..." and see that I'm hardly alone.  I added to that (old) thread and it was recommended that I start the discussion again here.
The symptom is I log into the helpdesk.  Some period of time later ranging from hours to days, I get an invalid login error (note that this is a web page that automatically refreshes every five minutes).  Tracing the helpdesk code when this happens, I see that it has reached a point where it can find no valid authentication method, including cookies.  In other words, it wasn't presented any cookies.  I've debugged the helpdesk code that sets the cookies, and it only runs when it's supposed to, on initial login.  The session id is still active in the helpdesk database.  The software isn't unsetting these cookies.
The cookies disappear from the Show Cookies list in Preferences.  They disappear from the Cookies.plist file.  Other cookies which are older and expire sooner are not being deleted, so this doesn't look like some kind of house cleaning thing.
Based on the previous discussions, a lot of people seem to think this has something to do with size or number of cookies.  I'm setting two cookies, which Web Inspector lists as 51 and 19 bytes respectively.  There are two other active cookies for this web page, set by some other application with a more global domain name (e.g. I'm using helpdesk.foo.edu, and these cookies are for .foo.edu).  The other two cookies list as 60 and 347 bytes.  I'm hardly hitting any limits here.  Overall there are about 30 cookies generally within the foo.edu domain, but most of these are limited to other subdomains.
One bit of weirdness here though, is that Web Inspector says "4 cookies (13.51KB)".  Even in the long form storage in Cookies.plist, these four cookies only use about 2K, so maybe this is one big hint.
Here's a laundry list of other related facts:
The cookies in question are set to expire in one year
No one else here seems to be having this problem.  Everyone else is on Linux.
Currently: Safary 5.0.5, OSX 10.6.7.
Problem existed on earlier versions of both Safari and OS X (but maybe only Snow Leopard?)
No Safari extensions installed.
Cookies.plist is around 4.5 MB
My home is an NFS home directory
I'm usually running next to nothing: Safari, Thunderbird, Terminal, X11
Cookies can get lost at any time - when I'm actively browsing elsewhere, or when I've been away from the desk for hours.
I don't see this anywhere else, but every other site I can think of either I use very short sessions (15 minutes, like banking or something), or I'm using session cookies (e.g. Twitter I don't ask it to remember my login).
tom

So yes, just now I had some cookies vanish again.  But in this case, I wasn't even using the web pages (or website) where the cookies are stored (I didn't have the auto-reloading helpdesk page open).
I left a script running which was watching my ~/Library/Cookies/Cookies.plist file, and would send me a text message if the helpdesk cookies disappeared.
I sat down at the computer which hadn't been used in a day, and reloaded a twitter page.  Followed by a text message that my helpdesk cookies had disappeared.  The cookies were set to expire August 18th 2012.  Many of the cookies in my 4.5 MB Cookies.plist are much older cookies, set to expire much sooner than that.
So it is absolutely 100% verified that Safari is dropping cookies which are not set to expire, and are not even involved in current web activity.
tom

Similar Messages

  • Safari Keeps Losing all my Cookies

    It seems that when I log out (maybe not, could be totally random) I lose all my Safari cookies. This is starting to get on my nerves, and seems to have started after installing 10.5.1. Has anybody else experienced this and have a fix?
    --Thanks.

    Either you are or you aren't. Which is it? What's giving you that idea? What do you have set under Safari->Preferences->Security->Cookies?

  • Safari, "Private Browsing" - why are cookies saved?

    I normally use Private Browsing out of habit on all my computers using Safari but I do have a few questions on it -
    Why are cookies saved even when "private browsing"? go to one genealogy site that requires membership and the cookies from that site are always present in my cache. Are pages also being saved in the page cache as well?
    What is so "private" if info can be assembled?

    HI Jim,
    This from the Safari Help Menu:
    About cookies
    A cookie is a small file created by a website to store information. The cookie is stored on your computer. Cookies are normally helpful and harmless; it’s rare to encounter a bad cookie.
    When you visit a website that uses cookies, the site asks Safari to put cookies on your computer. When you return to the site later, Safari sends back the cookies that belong to the site. The cookies tell the site who you are so that the site can show you information that’s appropriate for you.
    Cookies can store information that identifies you, such as your name and email address. A website has access only to the information you provide. For example, a website can’t determine your email address unless you provide it. A website can’t gain access to other information on your computer.
    When you use the default cookie preferences in Safari, you won’t know when Safari is accepting or sending cookies.
    You can change your cookies preferences so that Safari doesn’t accept cookies or accepts them only from limited sources.
    And here's more info: http://www.howstuffworks.com/question82.htm
    Carolyn

  • Safari Crash / Could not open cookie file Cookies.plist for reading

    Hi everyone
    I dont know why my Safari is Crashing, I review the console and I find this line:
    Help... I dont how to solve the problem...
    *ntlmRand failed to open /dev/random
    2007-01-26 23:48:55.004 Safari[8953] Could not open cookie file "/Users/scanner9/Library/Cookies/Cookies.plist" for reading.
    2007-01-27 00:00:53.553 Safari[8953] Could not open cookie file "/Users/scanner9/Library/Cookies/Cookies.plist" for reading.
    2007-01-27 00:01:16.915 Safari[8953] -[BrowserWindowController loadWindow]: failed to load window nib file '/Applications/Safari.app/Contents/Resources/English.lproj/Browser.nib'.
    2007-01-27 00:01:16.923 Safari[8953] Cannot load Interface Builder file 'NSAlertPanel'
    Thanks.

    jhpereze,
    Quit Safari, find the Cookies.plist file in your Macintosh HD/Users/yourusername/Library/Cookies folder, drag it to your Desktop, log out/in or restart and let us know what happens.
    If that is unsuccessful post your Safari crash log for further analysis.
    ;~)

  • Does Safari support the vary by cookie header

    I am developing a website that stores user preferences in cookies. In the vary header I specify the browser should vary by cookie. However, it seems that this is ignored in Safari on Mac, as it retrieves the page from local cache even if the cookie value has changed.
    It works correctly on Safari for PC and other browsers.
    Does anybody recognize this behaviour?
    Does Safari support the vary by cookie header correctly?
    Message was edited by: benverhees

    If you try it from http://regexpal.com/ you'll see that it works as it should in IE and FF but not in Safari.
    Message was edited by: Andrea Ercolino

  • Why is my ipad suggesting bookmarks from my iPhone? I turned off iCloud safari and deleted all history, cookies.

    I keep getting suggestions when I type a URL in safari and they are bookmarks synced to my iPhone. I did sync these bookmarks at one point to my iPad over iCloud, but since have deleted all bookmarks, cleared cache and history, turned off safari sync in iCloud between devices, turned off my iPad as well as removed safari from the multi tasking bar and I still can't figure out why these suggestions keep turning up when I type a URL. Does anyone have this problem as well, is there anyone with a solution? I turned off all safari syncing on iCloud on all of my devices as well. I have an iPhone 5 iOS 6.0.2 iPad 4 iOS 6.0.1. Thank you Apple community for devoting you're knowledge and time to us Apple users in need of assistance. I really do appreciate everyone trying to help. If there is such a thing in this situation.

    Have you poked around in the settings? there are a lot of things defaulted to on that you may not need, such as background app updates, background app refresh and notifications.

  • Why is it when I choose "block cookies always"  I still get lots of cookies showing in my preferences even though I clear them after every use

    Why is it when I choose "block cookies always"  I still get lots of cookies showing up when I look at my preferences.  I always clear my cookies after each use but I don't understand how I can get any at all if they are supposed to block cookies always?  I have a desk top Mac and am using safari. 

    Safari caches cookies in memory and will sometimes write them back to disk after they've been deleted, for reasons known only to the developers. After deleting cookies, quit Safari immediately, then relaunch it. The cookies should now be gone for good, or until you visit the same sites again.

  • Itunes wont open. Ive tried uninstalling, cleaned up my PC and then re installed again but still wont open! There are no error messages. It just wont open

    Itunes wont open. Ive tried uninstalling, cleaned up my PC and then re installed again but still wont open! There are no error messages. It just wont open! Im very frustrated and anything would help! I have Windows 7 or Vista. Idk which

    Hello Dr.Help,
    Thank you for providing so much information about the issue you are experiencing with iTunes.  It sounds like you have tried reinstalling it, but nothing happens when you launch it.  I recommend following the steps in this article to resolve launch issues with iTunes:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT4623 My ios update keeps getting stuck on the Restoring iPhone software stage. I uninstalled iTunes and reinstalled it again, but still nothing. Now I can't even use my phone as it shows the plug into iTunes screen. Please help!!!! Thanks,

    My ios update keeps getting stuck on the Restoring iPhone software stage. I uninstalled iTunes and reinstalled it again, but still nothing. Now I can't even use my phone as it shows the plug into iTunes screen. Please help!!!! Thanks,

    A Restore first downloads a new copy of iOS to your computer. On a slow Internet connection this can take a long time. How fast is your connection? How long would you expect it to take to download 900 MB?
    That's assuming nothing is interfering with the download. Some firewalls and antivirus programs will block the download or slow it down. So you should temporarily disable your security software. Security software can also block the update after the iOS download is complete.

  • HT5922 Can I airplay a movie from safari on my MacBook to Apple TV and still use the computer for something else at the same time?

    Can I airplay a movie from safari on my MacBook to Apple TV and still use the computer for something else at the same time?

    Hi frogjt,
    Welcome to the Apple Support Communities!
    Great question! You can absolutely do this in OS X 10.9. The attached article explains how the process of using AirPlay with Apple TV to create a second display. Also, towards the bottom of the article there are instructions on how to set your Displays preferences on the computer to make sure the TV and MacBook Pro displays are set up the way you want them to be.
    OS X: Using multiple displays in Mavericks
    http://support.apple.com/kb/HT5891
    Have a great day,
    Joe

  • App store tried to update iBooks app. I can only see Newstand app on my screen and cannot get to bookstore. How can I delete and download the iBooks app again. iBook still appears in the settings menu as version 2.1   Tx iPad 2, iOS 5.0.1, iBooks 2.1

    App store tried to update iBooks app. I can only see Newstand app on my screen and cannot get to bookstore. How can I delete and download the iBooks app again. iBook still appears in the settings menu as version 2.1
    Tx
    iPad 2, iOS 5.0.1, iBooks 2.1

    Hi,
    the settings are gone, i guess. But even worse, I cannot get the iPad2 to play Full HD thru the Apple digital AV adaptor using apps that support  (and advertise this), like AVPlayer HD. This definiteley used to work before one of the last iOS upgrades. (I am now at 5.1.1).

  • Creative cloud quit, says "download again" and still no joy, same message.  Camera raw gone, Existing Lightroom and PS-12 won't talk.  What's up?  Looks like Creative Cloud trial botched up something. iMac

    Creative cloud quit, says "download again" and still no joy, same message.  Camera raw gone, Existing Lightroom 4.3 and PS-12 won't talk.  What's up?  Looks like Creative Cloud trial botched up something. iMac
    Tried a number of "fixes" from blogs.  No joy.  Deleted all my adobe apps, rebooted, and Creative Cloud says it needs to reload.  Went through that process, and it quit near the end, saying it needed to reload and directed me back to same Adobe site.  Hmm.  Round and round we go.  How do I get off of this loop and get my Adobe Lightroom and PS working fine again?  Whole episode started after loading CC and then PS said it didn't have Camera Raw.  Went and downloaded that, wouldn't load and said I needed Adobe Download Diagnostic (or something like that) went to suggested link, whereupon it tells me it is no loger available. 
    Looking forward to cleaning everything off and starting over!!  Any input gratefully accepted and I will NOT be trying CC again.  I am sure it is just fine, just not for me, now. 
    David Balcaen

    I forgot to write down my computer specs:
    iMac 27 Mid 2011
    2.7 GHz Intel Core i5
    4 GB 1333 MHz DDR3
    AMD Radeon HD 6770M 512 MB
    OS X 10.9.2

  • TS1702 I just bought a new iphone 5S and once turned on and pushed the button restore from Icloud, I'm stil stuck in this section i can't do anything plus i turned it off and on again and still not working, please provide me with a solution very urgently!

    I just bought a new iphone 5S and once turned on and pushed the button restore from Icloud, I'm stil stuck in this section i can't do anything plus i turned it off and on again and still not working, please provide me with a solution very urgently!!
    Kindly note also that i did not work on this iphone before, i just turned it on and i cannot connect it to the itune and restore it as the itune cannot read the device since i'm not able to reach my home screen, I am stuck in my restoring screen.
    Please help!!!!

    You dont have any data on your phone yet right?
    If you dont connect your device to the computer and
    Press and hold the Sleep/Wake button and the Home button together for at least 15 seconds, until the Apple logo appears.
    after that click okay when it says itunes has detected an iphone in recovery mode. Then click restore
    after that try again

  • I'm having trouble transferring the songs on my ipod to my HP computer. Everytime i authorize the computer to allow the songs to go on, it doesn't do anything. Then I authorize it again and still nothing has changed. Any suggestions?

    I'm having trouble transferring the songs on my ipod to my HP computer. Everytime i authorize the computer to allow the songs to go on, it doesn't do anything. Then I authorize it again and still nothing has changed. Any suggestions?

    Was the content purchased from iTunes?  If not, it will not transfer.

  • I changed everything and i signed out then i sign in again but still my. apple id is disabled plz solve this problem!!!!!????

    I changed everything and i signed out then i sign in again but
    still my. apple id is disabled plz solve this problem!!!!!????

    Hello jek28,
    Thanks for using Apple Support Communities.
    If you're getting the message that your Apple ID has been disabled for security reasons, then please follow the directions in the article below to resolve the issue.
    If your Apple ID has been locked - Apple Support
    Have a good one,
    Alex H.

Maybe you are looking for