none
Why does windows always delete my cookies when it not shutdown correctly

    General discussion

  • i have noticed that if the windows is not shut down correctly meaning that i am forced to shut it down via restart button i loose some cookies plus all restart points so whats the point in restore points if they get lost that easily but the cookies is the most strange and most annoying problem i just don't understand it not to mention the other problem i have with ie8 every now and then that it only appear half screen as i mention in the past you really need to improve ie8 to work better with windows 7 because at the moment it not the best browser for this operating system.
    Tuesday, October 27, 2009 12:37 PM

All replies

  • Hi,

    You'd better make sure that you haven't checked "Delete browsing history on exit" under Tools==>Internet Options. Moreover, make sure you have enough space to store cookies and configure enough long time keeping the history under Settings of Browsing History. By default, Internet Explorer can store a maximum of 20 cookies and cookies can be stored for 20 days. BTW, have you changed the location of Temporary Internet Files?

    Best Regards
    Dale
    Wednesday, October 28, 2009 6:39 AM
    Moderator
  • i have not checked Delete browsing history on exit i do have more then enaf space and i have not changed the location of Temporary Internet Files and this problem only occuer when the computer is abruftly shut down but i never had problem of loosing cookies or any other information in xp in this situation only
    in seven.
    Wednesday, October 28, 2009 12:56 PM
  • Do you happen to start the InPrivate Browsing? If it is the case, cookies, history entries and temporary Internet Files won't be stored and deleted after the Private Browsing window is closed. Meanwhile, is your computer joined to a domain? There may be relevant Group Policy settings enabled to delete cookies on exit. You can launch Group Policy Editor to check the following folders:

    Computer Configurations\Administritive Templates\Windows Components\Internet Explorer\Delete Browsing History
    Computer Configurations\Administritive Templates\Windows Components\Internet Explorer\InPrivate

    User Configurations\Administritive Templates\Windows Components\Internet Explorer\Delete Browsing History
    User Configurations\Administritive Templates\Windows Components\Internet Explorer\InPrivate


    BTW,does this issue occur with normally shutdown?

    Best Regards
    Dale

    Thursday, October 29, 2009 3:20 AM
    Moderator
  • no i don't use  InPrivate Browsing and i'm not a part of a domain it's a bug a ie8 or windows 7 bug and as far as i know it does not happen in normal shutdown
    or in abnormal shutdown when i restart the computer i discover that some cookies like my home page which is a forum and gmail and possibly more.
    Thursday, October 29, 2009 5:53 PM
  • I have noticed this same issue.  Laptop crashed from a docking issue.  Forced device down.  When it came back up, all cookies for sites I had recently vistited were missing.  History appears to be maintained, but I am required to re-log back into sites I have already logged into.
    Wednesday, November 11, 2009 9:32 PM
  • Finally someone who knows what i'm talking about have you found a solution to this problem?

    Thursday, November 12, 2009 3:59 PM
  • I can also confirm this behavior.. cookies being deleted if system is not shutdown properly (ie BSOD). This happened to me twice with Windows 7. It has been a while but I think Vista does the same thing
    Thursday, November 12, 2009 4:41 PM
  • Well this problem need to be fixed because in xp it didn't happen so i don't see no reason why it should happen in windows 7.
    Thursday, November 12, 2009 8:05 PM
  • Perhaps, cookies aren't written out to disk immediately, or until IE shuts down properly?  In the event of a bugcheck, IE would have no chance to persist the cookies.  Consider an experiment - terminate IE prematurely and see if the cookies are present the next time you launch IE.
    Friday, November 13, 2009 11:59 AM
  • Mine does the same thing - has nothing to do with being joined to a domain (as I am).  Everytime IE shuts down unexpectedly or a BSOD, all previous cookies saved for ANY websites are lost.  I tested it on a site that was not part of the tabs the last unexpected shutdown.  IE8, Windows 7 Professional x64 all the latest patches as of Dec 17th 2009.
    Thursday, December 17, 2009 2:19 PM
  • I have the same problem, still no solution?

    Thursday, February 18, 2010 9:14 AM
  • i don't think that there is a lot of solutions to any of windows 7 problems that is why i'm using ubuntu 10 now days.
    Friday, February 19, 2010 6:10 PM
  • A lot of bag things happened when XP was not shutown correctly. I can't say if saving cookies is one but I don't know how ayone can predict the outcome of any system that is crashed or shutdown improperly.

    Enjoy Ubuntu.
    Saturday, February 20, 2010 6:16 PM
  • I know this an old thread, but I'm having the same problem when my laptop running Win7 shuts down unexpectantly. Anyone come up with a fix?
    Monday, January 24, 2011 1:55 PM
  • I am having the same problem any solutions?
    Tuesday, March 01, 2011 1:55 AM
  • Something during the normal shutdown procedures ensures that Cookies are kept. If there was some kind of tool like Process Monitor that displayed file/registry activity during the shutdown sequence, I'm sure it'd be easier to figure out what preserves cookies (and possibly other settings?) when shutting down normally.

    Because I seem to be having this issue more and more lately, I thought I'd try to find out as much as I could about what's going on behind the scenes.

    I started off with a development VM image I use. The guest OS is Windows 7 with several tools installed (including IE9, though probably irrelevant), so it's not too far from a standard installation anyone else would have. I first made sure to clear all browsing history from inside IE, including cookies, temporary files, auto-complete entries, etc - I essentially checked everything minus 'preserve favorites website data'. To make sure the IE9's history cleaning didn't miss anything, I had CCleaner remove everything it could relating to IE. I then set my home page to 'about:blank', navigated to website A (test page that set a cookie) and restarted the guest OS properly to make sure the shutdown sequence did whatever it's supposed to do.

    After Windows started again, as hopefully anyone would do, I opened Process Monitor and set a few filters: [Path, contains, "Cookies", Include] and [Path, contains, "index.dat", Include]. I started capturing, opened IE9, navigated to website A (test page that set a cookie), closed the browser, then stopped capturing. With that capture complete, I restarted the VM to simulate an abnormal shutdown and repeated the steps in the previous sentence.

    Armed with two captures, one of IE9's interaction with cookies after a successful shutdown, the other after an unsuccessful shutdown, I analyzed the two for any discrepancies.

    The log from the successful shutdown shows that IE is reading the cookie, whereas the log from the unsuccessful shutdown doesn't mention that cookie anywhere (even though it exists on the drive). Strange, why would that be? It's not reading the file even though the cookie file didn't physically change. Navigating to website A again reveals IE making a duplicate cookie (original was named user@domain[1].txt, new one is user@domain[2].txt). Same thing happens after an abnormal shutdown.

    I remember from a while back that during investigating IE's faulty history, I stumbled upon the infamous index.dat file (hence why I added it to the Process Monitor filter). From what I can gather, the index.dat file in the %AppData%\Microsoft\Windows\Cookies directory contains a list of websites and corresponding cookie files. After a successful shutdown, the index.dat file is populated with entries, but after a failed shutdown, those entries are missing.

    So that brings me back to the original issue. What is it that a successful shutdown does regarding cookies and the corresponding index.dat file that is crucial for avoiding these issues? Why is the process doing during shutdown? And lastly, will there be any adjustments made so a shutdown isn't necessary to keep this issue from occurring? Whatever the case is, it'd be nice to have some answers (how about a workaround!), especially considering this has been an issue since the early days of XP/IE6, if not earlier. I can probably speak on behalf of a large majority of users that have this issue that this one takes the cake on the annoyance scale.

     

    Note: I'm using Internet Explorer as the example program in this scenario only because it uses/stores cookies in the same way that other Windows programs do. Firefox, Chrome, or whatever other programs wouldn't have worked as they use/store cookies differently (and ironically, are thus not affected by this issue).

    Thursday, March 24, 2011 12:45 AM
  • SnowKnight,

    Thanks for posting this. Like you I have been searching for a solution to this exact problem for 1 year now with zero results. You've posted exactly the same situation I have and I appreciate the explaination for what is happening behind the scenes.

    Like others reading this, I've only heard from MS to use auto complete. But I don't want to use autocomplete, I want basic cookie technology circa 1994 to work correctly in my Windows 7 box.

    If anyone finds a solution to this please share it.

     

    Thursday, April 21, 2011 1:53 AM
  • This issue is also majorly pissing me off.

    F***ing Microsoft Windows 7 has crashed 6 times on me this morning, now purportedly resolved (due to F***ing Adobe Flash crashing due to F***ing Hardware Acceleration now disabled in Flash). On every F***ing crash, F***ing MicroSod Windows has lost my browsing history and cookies requiring a slow relogin of every website I use as well as lengthy check of my MS Outlook files.

    I've wasted two hours of time on reboots this morning. Actually, I am completely and utterly pissed off and distracted from the work I've actually got to do. Assholes.

    Also F***ing Windows Media player loses not only my current track but my current playlist entirely and then reopens playing something I never asked for.

    Microsoft really need to sort out the attrocious quality of their software. It's not good enough.

    Thursday, July 14, 2011 12:28 PM
  • OMG...I am hanging on to this thread for dear life! I've been soo frustrated with losing pictures, & my pdf's..(sigh) my dumb arse wants to program lol.honestly I'm just learning the wonders of webbing so i thought maybe i'd inadeverantly...idk. Ive heard of virtual pc somthing or another...can i smoosh windows and toss it way it back to the desktopia underneath some encryptonite??
    Did ya hear the one bout the autodidact with short term memory loss...
    Thursday, July 14, 2011 10:03 PM
  • Still no resolution?  This laptop has a terrible cooling system and shuts down all the time.  I know that I am more than a little annoyed.  Time to switch to Firefox full time.
    Sunday, September 11, 2011 11:36 PM
  • Has anyone in this thread spent the time required to fix the issues that are causing the unexpected shutdowns FIRST?

    One fellow mentions his laptop shuts down regularly due to improper cooling.  Loss of data isn't the problem, its the RESULT of the laptop not functioning properly!

    Saving cookies and other things are "housekeeping functions", the system commits them to disk when it is closing a session, this was presumably done to improve speed and make sure any changes forced by leaving a page are stored as part of that cookie package. 

    Unexpected shutdowns are a problem in need of immediate solution, not something you just bear along with and hope for the best, then blame the vendor for not saving your junk when you in effect allow another unexpected shutdown to occur.  In essence, you guys are blaming Microsoft for the loss of data when you tun off the power switch during a long write to disk.

    "MS, I'm pissed that your OS doesn't save my data when I turn off my machine during a write to disk!"  MS Answer: "Why would you expect data to be preserved if you turn off the system prior to completetion of the required process".

    Yes, with hundreds of vendors, poorly coded "free-ware" and all of the junk people like to put on their machines to appear "savvy", how is it that solving unwanted shutdown issues isn't at the very top of that "savvy" list.

    I'm reminded of a time when our tech support department got a call from a confused user, complaining that their "foot peddle" didn't work.  Well, it turns out the "foot peddle" was in fact the mouse.  Or the time a helpless user called in complaining their screen was black and the computer wasn't doing anything.  After a long, courteous, set-by-step debugging exercise, it came to light the users power was out, and had been for HOURS.  The issue was only discovered when the tech asked the user, as much as he was trying not to ask such an embarassing question, "is the computer plugged in to the wall outlet?".  The customer replied "OK, I'll check, let me find a flashlight".  "Flashlight?"  "Yes, the power is out and I can't see behind the desk, hold on a second..."

    It might be time consuming and difficult to find the source of unwanted shutdowns, but here are (2) incontrovertable facts:

    1).  There are hundreds of millions of computers running Windows 7 that DO NOT UNEXPECTEDLY SHUT DOWN.

    2).  If you find out the source of an unexpected shutdown is something you wish to ignore, YOU are responsible for your data loss, not Microsoft.

    Can't hardly believe I even had to type that out. 

    DAS

    Monday, September 12, 2011 6:22 PM
  • Have you ever had a power outage? Some things are just out of your control, but having cookies saved shouldn't be. As I pointed out earlier, all the other browsers don't seem to have an issue with cookies, but IE does. With that fact alone, you can rule out the irrelevant 'issues that are causing the unexpected shutdowns.' If other companies can write software that does one thing properly, so can Microsoft.

    You say that cookies are committed to disk when closing the user session, but that's not true. The cookies are already on the disk. Infact, if you turn off write caching entirely, cookies are written to disk the instant they're created, which is while you're browsing web sites. Even then, improperly shutting down your computer will result in cookie loss. So how can that be? Even with the default setting of write caching enabled, the cookies wouldn't be in memory for very long. But again, that point is moot.

    The only thing that does happen when closing the user session (as far as I can tell) is the relevant index.dat entries file that keep track of the cookies are updated. Obviously some works needs to be done on this front because this shouldn't be done on session close. It should be done after the cookies are done being read/written.

    Monday, September 12, 2011 10:54 PM
  • Of course I've had a power outage, but, valuing my data, I invested in a UPS, several in fact.  Valuing my data and wanting to preserve my system configuration, I also invest in 3rd party imaging tools so my machines are never more than 10 minutes from fully functional should a drive die or whatnot. 

    It just seems so pointless to complain about loss of data during an unexpected shutdown as to be approaching joke level.

    Is it interesting that other browsers don't lose this apparently precious cookie data?  Sure.  I can see that as having some value if I were:

    blind to the fact that unintended shutdowns carry perils for a system in other areas like the registry, loss of cached data that might have genuine value like payroll information, bank deposits, the general configuration of low-level system parameters and whatnot.  You know, things that could be a whole lot more painful than having to remember a password, login name, or thread read-marks.

    The words "commits them to disk" were carefully chosen to indicate "made permanent".

    I know you are on a mission to have things work the way you think they should, and that's OK, there are things I'd like to have changed too.  But I can guarantee you I wouldn't be asking for changes in how the system acts when I stand idly by as my system resets itself due to a fault I refuse to address.  And of course that includes AC power dropouts as well.

    DAS

    Tuesday, September 13, 2011 11:30 AM
  • This problem also happens in Windows Vista (SP2) as well as Windows 7 (SP1) in IE9. 

    In my experience, this problem is not isolated to a forced shutdown due to a system error.  The most common issue for me is that Windows will reboot due to a system update, and upon restart the cookies are lost.  Today was a perfect example for me.  This morning my system updated, when I woke the computer up it informed me that it needed to reboot, and subsequently all my cookies were lost.

    My laptop has never experienced a power loss, BSOD, or any other system lock-up.  The only type of reboot I have initiated or experienced with it is due to a system update or my own preference to shutdown the computer.  On Windows Vista, at various times I may have had a power outage earlier in the year, however the most common reason (monthly) for that system to shutdown or reboot was for system updates, otherwise the Vista PC was never shutdown.


    • Edited by Adinnieken Wednesday, September 21, 2011 11:57 PM cleaned up the first sentence
    Wednesday, September 21, 2011 11:39 PM
  • Wow, someone really has anger issues.  The fact of the matter is that all cookies are lost when the computer is not properly shut down.  This is not an issue with Firefox.  In fact, I don't believe that it is an issue with earlier versions of Windows either.  It is an obvious problem with IE and something that will prompt me to switch browsers.

    Win7Tester, your solution is a lot the old Groucho Marx joke where a man goes to the doctor and says "Doctor, it hurts when I do this." and the responds "Well, don't do that."

    My question to you is what is acceptable to you from a hard shutdown?  Would you be okay with it if you had to restore your entire PC from backup everytime there was a thunderstorm?

    It would be one thing if cookies from that browsing session were not preserved, but all of the cookies are lost.  Gone.  No more.  Time to start over from scratch.

    Friday, October 14, 2011 7:49 PM
  • Well, at least I found a forum thread confirming the behavior I have witnessed with Win7 paired with IE 9 . 

    I am hopeful that someone,  somewhere knows a way to work around this. 

    Sunday, February 12, 2012 10:05 PM
  • I'm not completely sure, since I rarely get crashes, but I don't think this happened with IE8.  Someone please correct me if I'm wrong here.

    Anyone ever consider that this behavior may be coded to happen on purpose, for example as a security feature?

    Not that I know what it could be securing your cookies against...  Some combination of activities where someone could grab your cookies then log into your bank website or something?  No idea.

    It just smells as though it's being done on purpose.

    -Noel


    Detailed how-to in my new eBook: Configure The Windows 7 "To Work" Options

    Sunday, February 12, 2012 10:17 PM
  • Ya know Noel, I had the EXACT feeling myself.  I was thinking more of the angel that in some sort of twisted effort to reduce the chances of your computer crashing again that it was wiping the slate clean for your cookies etc.  (Not that it deletes them, just loses the index.dat

    I've used other browsers etc which is fine but I'd really like to find a solution for IE9 on this.

    Sunday, February 12, 2012 10:25 PM
  • I have this same problem with Win 7, but it also occurs every time I reboot normally.  I had thought it was due to some 3rd party stuff I had on my machine, but apparently not.

    Anyone ever figure this out?

    Thanks!

    Tuesday, May 15, 2012 3:10 AM
  • I have the same problem... both at unwanted and wanted restarts.

    Very annoying!

    At least, if it's a question of security, there should be a radio-button somewhere to override this peculiar behavior.

    Can anyone here at Microsoft comment on this?
    Is it an annoying behavior we must live with, or is it possible to do something about it?

    Regards

    a perturbed norwegian

    Monday, July 23, 2012 8:36 AM
  • Same problem here.

    Unfortunately "just shutting it down properly" isn't an option for me... I have this expensive piece of music hardware that runs on firewire, and it quite often freezes the PC when it's in use (really annoying in itself, I have tried everything to fix that problem, short of getting a replacement device).

    Anyway, the cookies are lost whenever a crash happens. It does not matter if IE is open or not when the crash happens, or even if I have used IE or not in the current session.

    Just a thought - maybe a workaround would be to write-protect the index.dat file so that it cannot be cleared? Might cause other problems though, or probably more likely IE would just ignore the write-protection and write to it anyway. But it's worth a try I guess...

    And just to confirm, I have IE set to never delete anything (to try fix the problem), so I know the cookies are not actually getting deleted.

    • Edited by awell Wednesday, August 22, 2012 12:32 AM
    Wednesday, August 22, 2012 12:31 AM
  • I just stopped using IE 9 for this behavior.
    Monday, October 01, 2012 11:39 PM
  • Internet Explorer 10 is released. This behavior still exists. This behavior is named as "IE Amnesia" (https://connect.microsoft.com/IE/feedback/details/735370/ie-amnesia-forgets-all-user-preferences).

    They did zillions of good things about IE10. But they made a big mistake by not giving it the due attention.

    Here is a list of same issue reported by different people:

    https://connect.microsoft.com/IE/feedback/details/735370/ie-amnesia-forgets-all-user-preferences
    http://social.technet.microsoft.com/Forums/en-US/w7itproperf/thread/0aaa80c3-87d3-4ea8-bd3a-c4f1e5b5ce39/
    http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/ie9-forgets-popular-sites-and-sometimes-site/6fbe0594-e14f-43c3-a393-c9f52a22b296
    http://superuser.com/questions/382382/why-do-i-lose-my-cookies-when-internet-explorer-is-not-shut-down-correctly
    https://connect.microsoft.com/IE/feedback/details/651314/lost-all-cookies-logged-off-from-all-sites-and-frequently-used-sites-about-tabs-list-without-doing-anything
    https://connect.microsoft.com/IE/feedback/details/653787/cookies-lost-upon-crash-or-unexpected-exit
    https://connect.microsoft.com/IE/feedback/details/601854/ie9-loses-cookies (Closed as by design.... really?)

    How else can people tell them about the intensity of this situation that they just put into the don't care column? Why can't they fix this problem once for all? I wonder how many hours would it take for an engineer having fancy degree and experience at MSFT to solve this problem? (not much) But can anyone put this issue to the right ears? Apparently bug reports on Connect goes to drain. IE team members might not even heard of anything like Connect. Otherwise it would be the priority #1 for IE user-experience team.

    Just saying because it really feels bad when some minor flaw renders the good ~18-years-old-and-still-evolving product literally unusable.


    Saturday, October 27, 2012 6:21 AM
  • False. It does happen in XP. I have exactly the same issue in Windows XP / IE8.
    Tuesday, October 22, 2013 12:17 AM
  • This problem has been bugging me since about 2009, first with WinXP and now with Win7. Cookies get deleted following an unexpected shutdown, laptop running out of juice or sometimes after a forced reboot following a Windows update.

    I have now created a batch file that runs every day to preserve my cookies and the infamous index.dat file so that I can recover them in the event of a failure.

    Tuesday, December 03, 2013 11:06 AM