Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Checked "Clear Cache on Exit" in Firefox 25. Now it hangs on start. Is there a way to disable that setting outside of Firefox?

  • 16 replies
  • 6 have this problem
  • 34 views
  • Last reply by Relluii

more options

Yesterday I decided to check the setting "Clear Cache on Exit". This morning I couldn't start Firefox. It hangs and stays like that. I saw another post somewhere about this same issue. I created a new profile and that worked fine. It's only stuck when I try to use my old profile. It doesn't work in safe mode either. Is there anyway to turn off this setting outside of Firefox.

I've also tried downgrading to 24 and upgrading to 26 beta. Neither worked.

Yesterday I decided to check the setting "Clear Cache on Exit". This morning I couldn't start Firefox. It hangs and stays like that. I saw another post somewhere about this same issue. I created a new profile and that worked fine. It's only stuck when I try to use my old profile. It doesn't work in safe mode either. Is there anyway to turn off this setting outside of Firefox. I've also tried downgrading to 24 and upgrading to 26 beta. Neither worked.

Chosen solution

You can check for problems with preferences.

Rename or delete the prefs.js file and possible numbered prefs-##.js and user.js files to reset all prefs to the default value.

You can try to clear the cache manually on disk.
See the about:cache page for the location.
It is best to avoid using external programs to clean up your personal Firefox data and use built-in Firefox means instead.

Read this answer in context 👍 1

All Replies (16)

more options

Hello Relluii, try from win command line

  • firefox -preferences

thank you

more options

I tried it but that only brings up a Firefox 32 bit then hangs. Nothing ever pops up but I can see the process in task manager.

more options

any luck if you boot the computer in Windows Safe mode with network support ?

in win 8 : hold Shift button and mash the F8 key, if you see the new recovery mode, choose See advanced repair options > Troubleshoot > Advanced options > Windows Startup Settings > click Restart button > Advanced Boot Options > choose Safe mode with networking.

(to enable F8 key for safe mode with networking in win 8, like 7 and vista, go : CTRL + SHIFT + ESC > File > Run new task > write cmd.exe in the run new task window > check mark the Create this task with administrative privileges > when you see the : C:\Windows\System64> continue and write the next command bcdedit /set {default} bootmenupolicy legacy > click Enter > you can see the Operation completed successfully. Now when you boot and hold the F8 you can see the Advanced Boot Options.....safe mode, safe mode with networking etc.)

thanks again

Modified by ideato

more options

That didn't work either. Same thing still happens in safe mode.

more options

Are you only clearing the cache or cookies as well?

Note that Firefox will try to clear private data on a next start if Firefox didn't succeed doing this on the previous close (pref privacy.sanitize.didShutdownSanitize is missing or false).

Make sure that Firefox is closing properly and that there are no hanging Firefox or plugin-container processes left.

Use "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: Firefox > Quit Firefox; Linux: Firefox/File > Quit) to close Firefox if you are currently doing that by clicking the close X on the Firefox title bar.

Modified by cor-el

more options

Can't do anything. The entire Firefox process hangs. In task manager it says Firefox Not Responding. When I click anything inside of Firefox, it freezes and the cursor spins. It stays like that. I can't click File.

more options

Still no luck either with starting Firefox in Safe Mode?

You can use one of these to start Firefox in Safe Mode:

  • On Windows, hold down the Shift key while starting Firefox with a double-click on the Firefox desktop shortcut
  • On Mac, hold down the Options key while starting Firefox
  • Help > Restart with Add-ons Disabled

Try to boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.

more options

Safe mode was the first thing I tried. It didn't help. A new profile worked but I do not want to do a full reset.

more options
more options

I'll try this tonight if possible.

more options

Chosen Solution

You can check for problems with preferences.

Rename or delete the prefs.js file and possible numbered prefs-##.js and user.js files to reset all prefs to the default value.

You can try to clear the cache manually on disk.
See the about:cache page for the location.
It is best to avoid using external programs to clean up your personal Firefox data and use built-in Firefox means instead.

more options

Hmm resetting prefs.js did the trick. What's inside of prefs? about:config settings?

more options

Found the setting that was causing this. user_pref("privacy.sanitize.sanitizeOnShutdown", true); Inside of prefs.js. I turned it to false and everything's good. Although I lost the session.

Thanks for the help.

more options

edit. i see you fixed it. I wrote this then took a break before rechecking it worked
- and still had a typo with wrong pref !

From your OP you wish to change a particular pref the one for clearing cache on exit, but are unable to start Firefox, and are blaming the problem on this change. I can think of a couple of ways of attempting to address this issue.

  1. Try to fix the hang.
    That may be as simple as ensuring Firefox is closed properly using Firefox button -> exit. Then leaving it alone for a large number of minutes before trying to restart it.
  2. Change the pref, two possible routes
    1. Change the pref using working Firefox install and profile. Overwrite the applicable faulty file with a copy of the usable file. This may have some side effects, but probably will work.
    2. Directly edit the pref, not normally recommended but probably the easiest method.
    3. The third method you may not wish to use as it destroys settings BUT
      is it is a useful test rename the file and Firefox will re create a working one.
      it is a good partial fix it does give you a working profile with bookmarks passwords, extensions etc. as before

Try the first method, it may not work but worth a try because maybe Firefox is just not getting time to clear the cache the first time.

If that fails try approach 2-2
Briefly stated the aim is to

  1. With Firefox CLOSED Locate the correct broken profile.
  2. Within that Find the file prefs.js effectively backing it up by renaming it. #Copying this and editing it to add a pref called privacy.clearOnShutdown.cache with value false before,
  3. Correctly renaming the file and restarting Firefox with the changed file and pref.

I am hoping only a single important pref was changed.

Now for more detailed notes and instructions.

First of all look at what happens with your working copy of Firefox and a new working profile, before using this knowledge to fix the other profile.

Profiles
Firefox names profile folders by using a name similar to that shown in the profile manager but adding some pseudo random digits in front of that. Alternatively if you created them totally manually you will know the correct files and locations, otherwise default locations will have been used. (I hope you did not rename with profile manager that confuses things the profile names and folder names will no longer correspond, but a file named profiles.ini should still track them)

Observing the prefs

  1. In your working profile navigate to about:support note that the pref privacy.clearOnShutdown.cache value false is present once you have restarted with custom History but NOT clearing cache on exit.
  2. Toggle the "Clear Cache on Exit" option. Tip note you may navigate to the option using chrome://browser/content/preferences/sanitize.xul
  3. Note how it changes in about:support BUT only after Firefox restarts and re writes the prefs.js file
  4. With Firefox open find your profile folder by using Help-> Troubleshootng Information-> Profile [Open Folder] (Or some similar wording)
  5. With Firefox closed. Give it a couple of minutes and refresh the profile folder examine the file prefs.js
  • Note privacy.clearOnShutdown.cache appears only when the value is false and needs to be added editing the file to do the equivalent of unchecking "Clear Cache on Exit"
    Carefully note the syntax and that the entries are in alphabetical order.

Now make the changes for real in the problem profile.

  1. With Firefox closed Rename the prefs.js Maybe call it prefs.js.broke
  2. Restart Firefox. Firefox will recreate a prefs.js file Not the one you want but a useful test Firefox should start with default prefs set.
  3. Close Firefox rename prefs.js maybe to prefs.js.default
    Copy prefs.js.broke, rename to prefs.js.
    edit in the pref being careful to get the syntax correct. Expect the line to be
user_pref("privacy.clearOnShutdown.formdata", false); 

oops inconsistent. Wrong option. As repeatedly above, correct pref is

user_pref("privacy.clearOnShutdown.cache", false); 


You may be interested in explanatory articles

Modified by John99

more options

Note that privacy.sanitize.sanitizeOnShutdown is toggled by the "Clear history when Firefox closes" check box.

more options

Oops, that's what I meant to say in the title. I didn't remember exactly what it was called. Yes that's the setting I checked before Firefox started hanging. Thanks again.