Fix: Firefox Won’t Save Cookies or Auto-Logins

firefoxquestion1Update 06-16-09: Mozilla has announced in Firefox 3.0.11 that “Several issues were reported with the internal database, SQLite, which have now been fixed by upgrading to a newer version.”  So if this guide works for you, be sure to upgrade to the newest version of Firefox.

It can strike when you least expect it – Firefox amnesia.  The symptom: Firefox no longer keeps you automatically logged in to sites where you have selected the “remember me” option.  I recently had this problem, and although Firefox would maintain my logins during my current session, they would immediately be forgotten when I closed the browser.  Typically, this problem is related to browser cookies, which are small data files stored on your computer by websites to help identify you and store information.

Before you start, it is important that you verify that Firefox’s forgetfulness is not caused by a simpler problem.  First, you should clear your current cookies, which can be done by going to Tools –> Clear Private Data and checking the Cookies box.  While you’re in there, you could clear your browser’s cache and authenticated sessions as well (just in to be safe).


Next, you should temporarily disable any add-ons you are currently using to ensure they are not causing conflicts with your browser’s operation.  You can systematically disable them one at a time via Tools –> Add-ons, or you can disable them all at once by running Firefox in Safe Mode and choosing to disable all add-ons.

To disable all add-ons at once, go to Start –> Mozilla Firefox –> Mozilla Firefox (Safe Mode)  and check the “Disable all add-ons” box.  You could also check the “Reset all user preferences to Firefox defaults” to make sure it isn’t a problem with your browser settings, but be warned: this will remove any custom settings you have made (such as your browser’s start page).


If the methods above did not resolve Firefox’s forgetfulness, then the source of this problem is likely caused by a file called cookies.sqlite becoming corrupt.  This file manages Firefox’s cookies, and if it becomes corrupt it can stop Firefox from storing cookies altogether.

To fix the problem, completely exit Firefox and head to your Firefox Profile folder.  In Windows XP/Vista, this folder can be accessed by going to your Start Menu and clicking Run.  Copy and paste the following: %APPDATA%/Mozilla/Firefox/Profiles into the dialog box and press enter, and open your unique profile folder which will appear like jibberish (mine being 1nbhqks4.default)

In this folder, locate the file named cookies.sqlite.  Copy this file to a safe location as a backup (or you can rename the file to something like cookies.BAK) and then delete the original.  When you reopen Firefox, it will create a new cookies.sqlite file and it should now store cookies properly.


Note:  If you are still having problems after following this guide, check your virus scanner to make sure it is not modifying or quarantining your cookie files.