X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

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

Posted

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
Post a Reply

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36

More Information

ideato
  • Top 25 Contributor
617 solutions 4263 answers

Hello Relluii, try from win command line

  • firefox -preferences

thank you

Was this helpful to you? 0
Reply

Question owner

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.

Was this helpful to you? 0
Reply
ideato
  • Top 25 Contributor
617 solutions 4263 answers

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

Was this helpful to you? 0
Reply

Question owner

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

Was this helpful to you? 0
Reply
cor-el
  • Top 10 Contributor
  • Moderator
10762 solutions 96861 answers

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

Was this helpful to you?
Reply

Question owner

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.

Was this helpful to you?
Reply
cor-el
  • Top 10 Contributor
  • Moderator
10762 solutions 96861 answers

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.

Was this helpful to you?
Reply

Question owner

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.

Was this helpful to you?
Reply
ideato
  • Top 25 Contributor
617 solutions 4263 answers

If you select to keep the new profile, then see : Copying files between profile folders

http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox


thanks

Was this helpful to you?
Reply

Question owner

I'll try this tonight if possible.

Was this helpful to you?
Reply
cor-el
  • Top 10 Contributor
  • Moderator
10762 solutions 96861 answers

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.

Was this helpful to you? 1
Reply

Question owner

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

Was this helpful to you?
Reply

Helpful Reply

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.

Was this helpful to you? 1
Reply
John99
  • Top 25 Contributor
  • Moderator
622 solutions 8043 answers

Helpful Reply

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

Was this helpful to you? 2
Reply
cor-el
  • Top 10 Contributor
  • Moderator
10762 solutions 96861 answers

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

Was this helpful to you?
Reply

Question owner

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.

Was this helpful to you? 0
Reply
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.