# firefox restore session/start new session



## scott0999 (Jan 8, 2005)

it seems firefox cannot tell the difference between a crash, or if you just have the browser open while shutting down/rebooting

apparently this is a bug, but im just curious.. is there anyway for the restore session option to still be available if theres a crash, but for the message to not come up if the browsers open and you shutdown/reboot?


----------



## Augie65 (Mar 24, 2005)

That is a bug that has been entered into the bug report that may or may not be corrected in the future. As it stands now, Firefox can't distinguish between a crash and an unexpected closure. 
The only options that I know for now is to type *about:config* in the address bar of Firefox and hit *Enter*. Go to *browser.sessionstore.resume_from_crash* and set it to *false*
This will disable the restore session.
You could try this to disable the message, but it will always be disabled until you remove the preference.
Go into *about:config* and Right-click in the list and select *New*> *String*.
Enter *browser.sessionstore.restore_prompt_uri* as the pref's name.
Enter *javascript:window.close();* as the pref's value.
Close Firefox and the message shouldn't appear. If it doesn't work, just delete the preference.


----------



## adthrawn (May 15, 2007)

The thing is, technically, Firefox _is_ crashing. Windows is bluntly shutting it down. If you close your Firefox window first, that should help.


----------



## spiffi (Jun 10, 2007)

No, Windows is *not* bluntly shutting down. This is just poor message handling by Firefox.
Windows sends a *WM_QUERYENDSESSION* message to each application before logging off or shutting down. At this point each app has the chance to cancel the shutdown by replying FALSE to this message.
After each app has agreed to the shutdown, Windows sends the *WM_ENDSESSION* message to each app. If an application has cleanup to do, it should be done in reponse to this message.
My guess is that Firefox simply does not handle these messages itself but leaves them to system default message handler instead, which will just return TRUE to both messages.


----------

