
How to prevent firefox from restarting previous session when restarting
I have a page with Javascript that makes server calls in the background. When Firefox restarts, that page does not show up but I can see the calls being made from the server logs and noticed that there are a number of children processes under firefox, like:
/Applications/Firefox.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container -childID 6 -isForBrowser -prefsLen 56 -prefMapSize 258337 -sbStartup -sbAppPath /Applications/Firefox.app -sbLevel 3 -sbAllowAudio -sbAllowWindowServer -parentBuildID 20200507114007 -appdir /Applications/Firefox.app/Contents/Resources/browser -profile /Users/cyboBook/Library/Application Support/Firefox/Profiles/uoc2ga4o.default 2467 gecko-crash-server-pipe.2467 org.mozilla.machname.937263303 tab
I'm not sure which one is the one with the script but, after going down one by one, I usually kill the one with the calls before killing all the active tabs.
The "Restore previous session" checkbox is off in the System Preferences so, when I restart the browser, I don't see my previous session, which is what I want. However, it seems like firefox is restarting previous tabs anyway but not showing or rendering them so they are only partially restarted--enough so that the javascript starts running but not enough so I actually see that a web page exists and is causing a runaway script in the background.
This seems like a bug to me. Not sure how long a fix will take but, in the meantime, Question: can I/should I clear out the directory that has data for firefox to restore the session that I don't to have restored? Is it in the .../Profiles/XXXXX.default file (on OSX)?
Thanks!
All Replies (2)
@ flightyjames :
Please ignore yakesiv181 's post - it's a scam !
Hi flightyjames, sites can register "service workers" which are background threads used to provide services such as new email notifications. Before shutting down, you might take a look at the internal page
about:serviceworkers
and unregister the ones you have no further need for. Does that make any difference at the next startup?
If so, perhaps there is a way to avoid "restoring" those, but I haven't researched it.