Closed Bug 398817 Opened 17 years ago Closed 16 years ago

Clearing browsing history on shutdown causes previous session to be forgotten

Categories

(Firefox :: Session Restore, defect, P5)

x86
All
defect

Tracking

()

VERIFIED WONTFIX
Firefox 3 beta3

People

(Reporter: markhkamp, Unassigned)

References

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8) Gecko/2007091216 GranParadiso/3.0a8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8) Gecko/2007091216 GranParadiso/3.0a8

When I close the browser with the option set to prompt me to clear private data on shutdown and browsing history is checked, the previous session's tabs are not restored.

Reproducible: Always

Steps to Reproduce:
1. Open Gran Paradiso Alpha 8 with a blank profile (I used to profile manager and not a clean install)
2. Go to Tools -> Options
3. Change the "When Gran Paradiso starts" option to "Show my windows and tabs from last time"
4. In the Privacy tab, check the box next to "Always clear my private data when closing Gran Paradiso" (leave the "Ask me before clearing private data" option checked)
5. Have any combination of tabs other than just about:blank open (I used about:mozilla)
6. Click the X to close Gran Paradiso
7. When the dialog to clear private data appears, make sure that "Browsing History" is checked and click "Clear Private Data Now"
8. Open Gran Paradiso again
Actual Results:  
Gran Paradiso opens with only a blank tab.

Expected Results:  
It should restore the tabs from the previous session according to the option set in Step 3.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007100705 Minefield/3.0a9pre

Confirming (although that's pretty much what I'd expect to happen - see bug 366572).
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Flags: blocking-firefox3?
Dietrich - what caused this change? Although this is a Truly Strange Set of Options and we might want to reverse our decision from bug 366572, I'm primarily concerned about what caused things to change.
Flags: blocking-firefox3? → blocking-firefox3+
I don't know how the coding in Firefox works, but I think that it might be possible to fix this by having 3 separate options for clearing private data on shutdown: 1: Don't clear that item of data; 2: Clear all of that item of data; and 3: Clear the item of private data except for what is in the current session (the one that's being closed). If this were to be done, then if one setting wants the first option and another setting wants the second option, the third option would be used. If the settings conflict can't be resolved like that, then it should at least behave consistently and notify the user.
My rough take on this is that privacy choices trump convenience choices.  If a user has chosen to clear browsing history on shutdown, that should take precedence over restoring some subset of that data.  Both are explicit user choices, the only question is which wins when there's a conflict.
Target Milestone: --- → Firefox 3 Mx
Priority: -- → P5
This is WONTFIX, IMO.  I think we handled it badly in Fx2, and this is the correct priority when there's a conflict.  Explicit choices around privacy should be respected in a clear way.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Target Milestone: Firefox 3 Mx → Firefox 3 M11
Blocks: 366572
There is a list of options in the "Clear private data" window, including items such as "Browsing History".
Is it not possible to add another item to that list, entitled "Active tabs and windows" or similar?  This, when UNchecked, would force Firefox to comply with the "Show my windows and tabs from last time" switch, giving the user control over this behaviour and removing the conflict.

Just an idea :-)
This issue is a big concern when you have selected to "clear private data on exit", and selecting that option makes session support 100% useless.  The issue with this feature is that it works differently if you are using it "on exit", or via menu option/hotkey.

The scenario for using the hotkey is this (in this scenario, the user has "browsing history" enabled as one of the items that will be cleared):
1. User is browsing sensitive material
2. User presses the hotkey to clear data.
Result:
All private data is cleared, but the tabs that are currently open are not closed, which leaves the "current" page in the history.

However, when using "clear on exit", all of the history is cleared, including the "current" item in the history, which leaves nothing to be restored on the next startup.

If a user is concerned with clearing their tabs when they close the browser, there is already an option for this where they don't enable session support in the first place.  They can start the browser with their homepage or a blank page, instead of "Show my windows and tabs from last time".  That is how it should be taken care of if a user wishes to disable session support.
(In reply to comment #10)

Brian I think you've misunderstood the complaint.
This isn't about wanting to disable session support - almost the opposite.
It's about being able to clear all private data on exit EXCEPT the current session, retaining the ability to restart Firefox with the last session intact.

At the moment the two settings conflict.  What we are looking for is a way to enable users to have the best of both worlds.  After all, not all browsing is data sensitive, and just because we don't want any private data kept doesn't mean we want to lose the session, say if one had several pages of research open.

I still stand by the simple addition of one more check box in the 'Clear Private Data' menu, called 'Current Session' or whatever.
When checked the current session would be deleted on exit, but if unchecked all data except the current session would be deleted.
What's so difficult about that?  It should probably be enabled by default, but at least users would have the option to disable it and have a browser that does what it's told.

Thanks, Stuart
Stuart, I think you've misunderstood my post.  My complaint is because I'm seeing the behavior listed in the initial bug report, and I agree that it is not behaving in the best manner and not in the way a user would expect.  Once you have "save sessions" enabled, you expect that to always happen.  In a user's mind, things in the history consist of "past things I've visited".  The current session is not part of "past things", it's part of "current things", and as such is not conceptually part of the history and should not be cleared.

As to whether there should be an option to allow clearing of session data in addition to history data I'm not sure applies here.  As I already said, if the user wants the option to clear session data, they can turn off the session saving feature.  There's no other use for an option like that because
1) when invoked via hotkey it would cause all tabs and windows to be closed?  which seems like a strange result, maybe better handled by some type of "boss key" extension
2) when invoked as part of "clear data on shutdown", it would be identical to disabling session saving

I don't see a need for "yet another checkbox" to enable or disable something that can already be toggled in another section of the options.
Hi again David.
I see what you're saying, but the thing is that at present Firefox clears Session Data when 'Clear Data on Shutdown' is enabled anyway (whether or not the session saving feature is enabled), meaning that whatever the user does there is no way of clearing "past things" but retaining "current things".

What I propose makes a definite distinction between the two, and enables the user to choose and be clear about exactly what will be deleted.
(This extra option would be enabled by default, so anyone who's happy with the current scheme would not be affected.)

The question of calling the Clear Private Data function while Firefox is still running is separate issue to the one described in this bug BUT when shutting down Firefox, it should do the same as pressing the hotkey or using the menu option, so it still applies.
I believe we both have different points, but which call for the same solution, i.e. some way of defining exactly what is deleted when 'Clear Private Data' is called.
Blimey this is complicated! lol
Cheers, Stuart
(In reply to comment #5)
> This is WONTFIX, IMO.  I think we handled it badly in Fx2, and this is the
> correct priority when there's a conflict.  Explicit choices around privacy
> should be respected in a clear way.
> 

No, the explicit choice is the user choosing to "Save and Quit".  He probably usually wants that part of the Browsing history to be cleared, but when he explicitly chooses to "Save and Quit", then he is overriding his privacy choice.  Otherwise, this is EXTREMELY counter intuitive.  The user is in NO WAY going to make the connection between having his Private Data cleared and having "Save and Quit" not work for him unless you make it evident to him when he is altering these settings.  I really think that this should be re-opened, because this is, if anything, wildly confusing to the user.


(In reply to comment #7)
> There is a list of options in the "Clear private data" window, including items
> such as "Browsing History".
> Is it not possible to add another item to that list, entitled "Active tabs and
> windows" or similar?  This, when UNchecked, would force Firefox to comply with
> the "Show my windows and tabs from last time" switch, giving the user control
> over this behaviour and removing the conflict.
> 
> Just an idea :-)
> 

Exactly.

First of all, "Show my windows and tabs from last time" and "Warn me when closing multiple tabs" should not be mutually exclusive, as session restore doesn't always restore everything properly.  If both are selected, then it should still warn you when closing multiple tabs, but "Quit" should act as "Save and Quit".  Currently, "Show my window and tabs from last time" overrides "Warn me when closing multiple tabs", which is confusing behavior.  That is the first thing that needs to be fixed before we can fix this bug. 

After that is fixed, here is a comprehensive proposal for fixing this bug:

What I suggest should happen is that we do, indeed, add another item to the list of Private Data, called "Active tabs and windows", and have it unchecked by default. Also, we must split the option called "Ask me when clearing private data" into two options, one called "Prompt me when I "Clear Private Data" during a session", and one called "Prompt me when I "Clear Private Data" on exit".  Make this second check box accessible only if "Always clear my private data when I close Firefox" is checked.

Then, if the user ever goes in to the Private Data settings and checks "Active tabs and windows", they will get a well designed dialog popping up, warning them, in the case that they use the "Warn me when closing multiple tabs" option, the "Save my windows and tabs from last time" option, or both, that these are partially incompatible with this setting, and give them the options to choose their scenario.  

A.) If they have "Warn me when closing multiple tabs" on, and "Save my windows and tabs from last time" off, then they must choose whether to:

1.) Have the "Save and Quit" button grayed out,
2.) Require "Prompt me when I "Clear Private Data" on exit" to be checked (and have in red, next to the Sanitize prompt window "Active tabs and windows" option, that your previous session will NOT be saved, or
3.) Leave the "Active tabs and windows" option unchecked. 
4.) Turn off "Warn me when closing multiple tabs" and check "Active tabs and windows option"

B.) If they have "Warn me when closing multiple tabs" on, and "Save my windows and tabs from last time" on, then they get to choose whether to:

1.) Have the "Save and Quit" button grayed out AND Require "Prompt me when I "Clear Private Data" on exit" to be checked (and have in red, next to the Sanitize prompt window "Active tabs and windows" option, that your previous session will NOT be saved, or
2.) Leave the "Active tabs and windows" option unchecked. 

C.) If they have "Warn me when closing multiple tabs" off, and "Save my windows and tabs from last time" on, then they get to choose whether to:

1.) Require "Prompt me when I "Clear Private Data" on exit" to be checked (and have in red, next to the Sanitize prompt window "Active tabs and windows" option, that your previous session will NOT be saved, or
2.) Leave the "Active tabs and windows" option unchecked. 
3.) Turn off "Save my windows and tabs from last time" and check "Active tabs and windows option"

After scenario A, if they chose #1, and they later choose to select "Save my windows and tabs from last time", then they will be prompted with the choices in scenario B.  After scenario A, if they later choose to de-select "Warn me when closing multiple tabs", then they don't have to choose anything.  If they then choose to turn "Save my windows and tabs from last time on, then they will be prompted with the choices in scenario C.


If they ever go and try to uncheck "Prompt me when I "Clear Private Data" on exit", then based on whether they are in Scenario A, B, or C, they will have to choose from among the other possible alternatives, or keep it as it was.


Somebody is going to have to build a state diagram or state table, because I may have missed one of the possibilities, but hopefully this is a start!  I'm sure there might also be more simpler cases with reduced functionality that would still be better than what we currently have.  I am just trying to detail out the most robust possibility.
Since the time I made this bug report, I've switched to Linux and the bug is still happening (Fx3 B5 on Kubuntu Hardy) so I'm changing the OS from "Windows XP" to "All".  Also, since there seems to be a consensus that the bug is important and should be fixed, I'm reopening the bug.

Since it's probably too late for Firefox 3 (especially with the first release candidate out), we can at least hope for a distinct setting for the current session's data to be cleared or not to be added in 3.1.
Status: RESOLVED → REOPENED
OS: Windows XP → All
Resolution: WONTFIX → ---
This bug was marked WONTFIX for a reason.  Consensus among a few people commenting on a bug does not constitute some sort of right to override a module owner decision.

There's a whole bunch of stuff that's trying to morph this bug.  The issue is whether "always clear my private data" or "save my session" should trump.

We should fix the UI though, i.e. it shouldn't be possible to Save and Quit when privacy prefs are set to delete all private data.  The choices should be Quit/Cancel in that case.  Same thing with "show my windows and tabs from last time"

Really, we should just clean up startup/shutdown prefs to be more coherent.  But that is not this bug.
Status: REOPENED → RESOLVED
Closed: 17 years ago16 years ago
Flags: blocking-firefox3+
Resolution: --- → WONTFIX
I have to agree with Mike Connor in #18 in that we should not go around the typical process that is followed here.  The module owner wins.  I also agree that some of the posts here greatly attempt to expand the scope of the bug, especially #14 and #16.

That said, I still think this is a valid bug and I wish the module owner would reconsider.  The comments in #4 do not take into consideration the subtleties of this issue, and attempts to use the "privacy hatchet" when a scalpel is what is required.  The ultimate privacy advocate would say that if you want privacy instead of convenience, turn off and unplug your computer.  Clearly the issue is more nuanced than that, and a blanket "privacy trumps all" statement is significantly misguided.

I stand behind my original comments in #10 and #12, that if the user wants this information cleared at shutdown, the option already exists (turn off session saver).  Clearing this data in the privacy options removes significant flexibility from the software.

I want to clarify that even though *technically* the current session may be stored in the history, that does not mean that to a user it is *conceptually* the same.  "History" is what I did in the past, and "current" is what I'm doing now, regardless of if the software considers "current" as "the most recent item in the history."  The technical nature of where the data is stored must not be confused with the conceptual perspective a user will have.

The act of enabling both options "session saver" and "clearing private data on exit" explicitly tells the software that the user sees those two concepts as separate and distinct.

As Firefox 3 moves further out the door, more and more people will start to run into this problem.  I think it's fair to say that the decision to change this functionality was made before many of the betas were in wide use, and those early adopters opinions may not reflect those of the whole.

If/when more people comment on this, and duplicate bugs are filed, that input must be considered as "votes" for this bug, because it shows that the issue has clearly not been put to rest.
Interestingly enough, Firefox follows the expected behavior on OS X (opens the tabs from last session), however it doesn't on Windows XP (as reported) - using RC1 for both.

I agree with Mike Connor here that the UI needs to be a little clearer as to what can & cannot happen.  Also, it should be consistent across platforms.

I can also confirm #19, although that should probably be a different bug.  This leads me to believe the code executed on "Exit" (or "Quit" on OS X) is not the same as the "close the last window" code, which could be the underlying problem to this bug.
(In reply to comment #22)
> I can also confirm #19, although that should probably be a different bug.  This
> leads me to believe the code executed on "Exit" (or "Quit" on OS X) is not the
> same as the "close the last window" code, which could be the underlying problem
> to this bug.
> 

That is probably an underlying problem with Clear Private Data.  I would argue that even though I like the fact that File->Exit doesn't demonstrate this bug, that it actually means that Clear Private Data is not clearing private data appropriately on File->Exit, instead of that File->Exit is appropriately initiating Session Restore.
(In reply to comment #23)
> 
> That is probably an underlying problem with Clear Private Data.  I would argue
> that even though I like the fact that File->Exit doesn't demonstrate this bug,
> that it actually means that Clear Private Data is not clearing private data
> appropriately on File->Exit, instead of that File->Exit is appropriately
> initiating Session Restore.
> 

I looked into this a lot today (and probably will more tomorrow). So the quit message is broadcast on File->Exit immediately. On window close, the window close code is run, which goes through a different process and doesnt broadcast the quit message until after the window is closed.

I believe the session save and clear private data code listen for that message.  Since the window is still open with File->Exit, the session gets saved because there is still a session to save.  The clear private data works regardless (even when the session restore "works").  I'm pretty sure the problem isn't with clear private data... at least not the problem of when it's clearing.  What the proper expected behavior is, that's what this bug really comes down to.
> I believe the session save and clear private data code listen for that message.
>  Since the window is still open with File->Exit, the session gets saved because
> there is still a session to save.  The clear private data works regardless
> (even when the session restore "works").  I'm pretty sure the problem isn't
> with clear private data... at least not the problem of when it's clearing. 
> What the proper expected behavior is, that's what this bug really comes down
> to.
> 

When using File->Exit, how would Session Restore work on restart without the Browsing History?  You see what I mean?  If Clear Private Data is supposed to clear the Browsing History following Exit, and Session Restore is dependent on Browsing History on restart, then what is happening differently on File->Exit? It would seem to me that File->Exit isn't properly clearing Browsing History, but the "Close X" is, and that is why Session Restore, placing privacy first, doesn't work with the "Close X". If Clear Private Data is working to put privacy first, then Session Restore should NEVER work if Browsing History is set to be cleared, across both "Close X" and File->Exit. 

Now, I don't agree that privacy should come first here, but shouldn't it be consistent?
(In reply to comment #25)
> When using File->Exit, how would Session Restore work on restart without the
> Browsing History?  You see what I mean?  If Clear Private Data is supposed to
> clear the Browsing History following Exit, and Session Restore is dependent on
> Browsing History on restart, then what is happening differently on File->Exit?
> It would seem to me that File->Exit isn't properly clearing Browsing History,
> but the "Close X" is, and that is why Session Restore, placing privacy first,
> doesn't work with the "Close X". If Clear Private Data is working to put
> privacy first, then Session Restore should NEVER work if Browsing History is
> set to be cleared, across both "Close X" and File->Exit. 
> 
> Now, I don't agree that privacy should come first here, but shouldn't it be
> consistent?
> 

I completely see what you mean, I'm just trying to give some insight into how this is happening.  And I certainly agree that it should be consistent.

AFAIK the session restore functionality is actually separate from the browser history.  I did some limited testing on this.  If you do the File->Exit path with session restore & clear private data, when you start FF again, you get your old session.  However, none of those pages are in your history (you can still press back & everything though). If you cleared your cookies, pages you were logged in to (ie Gmail) will require you to log in again.

So the crux of your argument, that Session Restore relies on Browser History, is false (again, AFAIK).  I'm not arguing with you and mostly agree with you, but I did want to let you know.  It boils down to what the expected behavior is *supposed to be* and cleaning up the path to shutting down the browser and making sure it's explicit what is happening.
Well then, that's good to know, because it actually wasn't my argument, but one of the arguments above for not fixing this!

What is probably happening is that even though Session Restore doesn't explicitly rely on the Browser History, checking the Browser History box does clear the Session Restore data when closing with the X, but not with File->Exit.  They should make a separate check box in Clear Private Data for Session Restore that instead does this, since it is obviously feasible in the code to do it, as they are already selectively doing it when clearing the Session Restore data with the X, and not with File->Exit.
Wow :O... Some progression has indeed been made since last time I commented in this thread!
Big time thumbs up!
I must say that I fully agree with every comment made since my last one, except #18, but I think why that is has been explained better by others than what I can do.
Hehe then I have to comment on this quote from #20:
"some of the posts here greatly attempt to expand the scope of the bug,
especially #14 and #16."
#14 is mine :P. Well I was very emotional about it in that post and used some big words, so I does understand how you can think so. But I doesn't agree with you :) that I am exaggerating the seriousness of this bug. It really "bugs" me (get the joke? ;P).

I have to say that when I saw how much activity there has been since my last comment, I got really happy and excited, like when you hear a really good song and get goosebumps.
There has just been so many constructive and good quality posts - that is so nice. It seems like developers knowing how to code and all that, are beginning to go deeper into this bug.

To make my comment constructive:
I didn't know that the bug did not exist if you close the browser by going to 'File' (Alt+F) -> 'Exit' (X). I can confirm that. 
That is super nice! I didn't catch that from reading #10 - sorry. If i had, maybe my comment back then wouldn't have been so "dramatic".
   I also have to repeat the point made by #20, that an extra option should not be added to the 'Clear Private Data' settings window, as this option would be the same as disabling "built-in session restore" AKA 'Show my windows and tabs from last time' and setting it to 'Show a blank page' instead.
But of course adding this option anyway, making it possible to restore session while having (real) history cleared would of course be a progression (=good point by the way about, that although current session may is part of 'Browsing History' technically, current tabs cannot be history literally speaking/in reality (or was that thing, the thesis just disproved by #26?)).
   But the ideal fix would be to not have current tabs (+additional windows if having such) to be part of the 'Browsing History' option in the 'Clear Private Data' settings window (when closing with the top right X button that is, because everything is working correct closing by going to 'File' -> 'Exit' as far as I can see. Correct me I'm wrong about this?). Because that current behavior is the same as deselecting 'Show my windows and tabs from last time'. That simply doesn't make sense (repeated to try to make #18 understand) having 'Show my windows and tabs from last time' enabled and it then acts like if you had 'Show a blank page' enabled instead.
   Lastly... Although it is beginning to look like this bug is been given the respect it discerns (a bug that should be fixed in official builds), I have while reading some other bug post experienced that users have attached something called a 'patch'. What I think such a thing is, is something that when implemented changes or add a behavior. I then have a request. It is if someone could make a patch so the (lets just say few users (compared to the majority who doesn't stumble into this) (all this is hypothetical)) not happy with default behavior could get a patch making them happy as well = everyone is happy. And if someone makes such a patch then please explain how to implement it (I doesn't suppose its an .exe file popping up where you simply only has to press 'install patch')
Peace out.
One option, FWIW, is to just disable history by unchecking the history pref.  This does not clear history on shutdown, it just doesn't record it, and session restore will not be nuked...
Not to be disrespectful to the module owner, I would like to voice my disagreement with Comment #4 and Comment #5.

I set Firefox to clear data on exit and not ask me about it. However clicking "Save and Quit" is an explicit action. While "Always clear my private data when I close Firefox" is also an explicit option, a user who will notice the Save and Quit button will naturally expect it to override his option. An action overrides an option.

It is like setting Firefox to block all tabs, but still allowing those tabs explicitly clicked on to open.

As I mentioned in duplicate bug 440918, I had some 20 tabs open but I had to do some errands, and I decided to take advantage of Firefox 3 offering to save all
my tabs. I clicked "Save and Quit" and walked away happily. When I came back I was horrified that the tabs weren't saved, and it took me quite a while to find each one again. Hence, the "Save and Quit" feature gave me a false sense of security.

It was a dataloss. I doubt if I was the only user who experienced it.

In my particular settings, I expect Firefox to Clear all my history, log me out, and then save my tabs if I chose Save and Quit. When Firefox restarts, I would expect Firefox to reload my previous tabs but with the history and cookies cleared.

As a workaround, I (sadly) unchecked "Always clear my private data when I close Firefox" and just hit Ctrl+Shift+Del before shutdown. If I want to save my tabs, then I just click Save and Quit. Ctrl+Shift+Del is extra work.

As much as possible, I wouldn't want my privacy settings changed. I want my private data cleared automatically without questions. However I would still want the capability to Save and Quit when the need arises, such as when having to leave the computer for a while. Save and Quit fits that need perfectly.

Please note that I am speaking as a user. I understand that developers have their own perspectives and priorities.
i agree Mike Conner; i use the workaround of uncheck "keep my history" AND in the private data settings uncheck "browsing history" that way your history is never retained, except to load windows/tabs from last time.  serves my purpose flawlessly.

this frees you from the no history/session recovery conflict with only expected and negligible loss in security
However, when a normal "Quit" is done, I would want my history deleted.
People PLEASE!!!
Instead of just putting a comment, VOTE for this bug as well. It can be done via the link "vote" in the top of the page. 
This bug only has 6 votes. That makes no sense. I have read 60+ different user comments around the web saying that they don't like this new behavior in FF3 and think it is wrong.

I must say that I am sad that the bug wasn't fixed in the new FF3Final, cause I had just got a little hope that it would have been.

Now commenting on the new comments since my last post:
I am sad to learn that my assumption in my comment #14 was right. That this bug is now keeping people from staying upgraded to FF3Final (they downgrade back to FF2) (see comment #32, comment #33, comment #39 and comment #46)

comment #47 especially made a big impression on me:
> As I mentioned in duplicate bug 440918, I had some 20 tabs open but I had to do
> some errands, and I decided to take advantage of Firefox 3 offering to save all
> my tabs. I clicked "Save and Quit" and walked away happily. When I came back I
> was horrified that the tabs weren't saved, and it took me quite a while to find
> each one again. Hence, the "Save and Quit" feature gave me a false sense of
> security.
> 
> It was a dataloss. I doubt if I was the only user who experienced it.
Reply to the last line: That was just how I felt too, when experiencing this bug my 
first time trying out FF3 Beta 4.

I have found some new "expression-of-opinion-events" made by the VIP's regarding this bug:
1. Mike Connor (module owner), bug 440472 comment #3:
in reply to this bug 440472 comment #2:
> yes, but I don't know why that would affect this because in Firefox 2, I had
> that option checked and Firefox still retained my tabs, it just cleared my
> private information.)
he replied (in bug 440472 comment #3):
> the contents of all of your tabs and the back/forward history aren't private
> information?
... it seems that he still doesn't think this is the wrong behavior.

2. Simon Bünzli (the one who filed a "bug" which created this one (see my comment #14
)), bug 442632 comment #2:
> This is probably a DUPE of bug 398817: you've set Firefox to clear all History
> data at shutdown - and Firefox now actually does so, leaving nothing to
> restore.
Hehe funny. Seems like he hasn't realized either that, that "improved behavior" he is 
talking about actually was present in FF2 as well. It did just that behavior if you 
choosed 'show blank tab' or 'show my homepage'. Only difference in FF3 from FF2 is 
that now a function is broken. Now 'Show my windows and tabs from last time' doesn't 
work anymore. I would like to hear Simon Bünzli's explanation for why he filed a bug 
requesting that 'Show my windows and tabs from last time' should do the same as 'show 
blank tab' or 'show my homepage'?? Why not just use 'show blank tab' or 'show my 
homepage' instead Simon Bünzli?? Can't you see that the behavior of FF with your bug 
366572 implemented patch is wrong (I assume that this is what has changed in FF3)?
Please I would like a answer from you on this. Don't hold yourself back on this. I 
don't dislike you at all, only the bug that you have filed. Peace/Best Regards.

Now to a good news, new comment made by a VIP regarding this bug, I have found:
3. Paul O'Shannessy [:zpao], bug 440918 comment #4:
> So here's how FF3 currently behaves - If you close Firefox using the X button,
> then Save & Quit doesn't save your tabs & windows.  If you quit using File|Exit
> then Save & quit, then it does.
> 
> This is inconsistent and part of what I'll hopefully get to clean up this
> summer.
> 
> Otherwise this is a duplicate and there is more discussion on the other bug.
> It's marked as WONTFIX, but there is still discussion, so I would suggest CCing
> yourself on that bug and following along there.
... It seems that he knows how to code/programming stuff and has a goal that he will 
have this fixed this summer. But with his comment #24 in this thread in mind it isn't 
sure that he will fix this bug (in my opinion) correctly. He still isn't sure which 
behavior is the right one it seems. See this quote from that comment #24:
> What the proper expected behavior is, that's what this bug really comes down
> to.
I hope that he makes up his mind that the 'File' (Alt+F) -> 'Exit' (X) behavior is the right one and the one that should be copied to/overwrite "closing clicking the FF 
chrome 'X'" and not the other way around.

Having read through some http://greasemonkey.devjavu.com/report/1 bug tickets, I 
haven't been able to not notice the phrase: "vote with code". It seems that a bug will be taken more serious if a code solution is offered by the bug filler/commenter. 
Unfortunately I ain't wise regarding programming at all. But I hope that I will become that within the next 10 years and as long as this bug is unfixed I will never forget it. But I really hope that I will not have to wait 10 years until I can fix this bug myself :O!.

As far as the solution/the desired behavior of this bug, I don't want to repeat myself again. I think how the right behavior should be is fine described in my previous comments (comment #30 and comment #14)

Oh BTW I just tested Minefield/3.1a1pre Gecko/2008070403 to see if the bug has 
been fixed in newest trunk builds: It hasn't. Exact same thing still occur, nothing 
new.

Let me sum up/repeat/confirm on Windoes XP:
1. the bug behavior doesn't happen when restarting. This applies both for the built-in 'Add-on window's restart button and if restarting by a add-on (e.g. "QuickRestart" add-on)
2. the bug behavior doesn't happen when closing via 'File' (Alt+F) -> 'Exit' (X).
3. the bug behavior doesn't happen if closing by killing FF on purpose via 'Windows Task Manager' (similar to a crash)
4. the bug behavior does happen when closing via the top right 'X' Firefox chrome button
(3 against 1)

Also I have just recently (within this week) learned what DOM Inspector add-on does and how to use it... This is what I have found:
1. 
In Add-ons window: Restart button = 
label="Restart Firefox"
value="Restart Firefox"
But I couldn't find the oncommand code that activates it.
2. 
'File' (Alt+F) -> 'Exit' (X):
#menu_FileQuitItem
id="menu_FileQuitItem"
label="Exit"
accesskey="x"
command="cmd_quitApplication"
oncommand="goQuitApplication()"
... with Keyconfig add-on (http://mozilla.dorando.at/) you can add the code "goQuitApplication()" (without the quotation marks) as a new key shortcut and quicker shutdown FF3 without the bug, than by 'File' (Alt+F) -> 'Exit' (X) (which truth to be said: I think that, that way is to much trouble so I have newer wanted to bother (instead I have had to turn of 'clear on shutdown', therefore the bug still annoys me. I want to be able to close Firefox without this bug by pressing the 'X' on the top right Firefox chrome!!!!)
3. 
In additon, by searching via the built-in search engine in the DOM Inspector I also found the following:
#cmd_closeWindow
id="cmd_closeWindow"
oncommand="BrowserTryToCloseWindow()"
Trying this oncommand code ("BrowserTryToCloseWindow()") out in Keyconfig, leads me to think that maybe this is the command being triggered when closing by pressing the 'X' on the top right Firefox chrome as using this code to close, then on startup, no tabs are preserved.

Finally let me come out with another opinion of mine: Democracy! 
Yes, I think that the number of users who like the new behavior is clearly in minority/oppposition to the majority of users, who don't like this new behavior. Something like 2 (Mike Connor and Simon Bünzli) vs. 60+ users :O.
The weird thing is that those two still haven't answered why people who like the new behavior, could not just instead have used the 'show blank tab' or 'show my homepage' option instead?? Why did they have to have a third option called 'Show my windows and tabs from last time' to do the exact same thing? This would be like making a change to Firefox, so users now in the File menu (ALT+F) to make a 'new window' also could press 'new tab' and then a new window was made as well. Destroying the option to make a new tab. ??? :S
(Just a quick comment)
@Someone:
(In reply to comment #60)
> The simplest fix is to separate browser history and session store to two
> different settings in clean history dialog.
> 
Please read my comment #30 (from the "I also have to repeat the point made by #20" part):
As said before, what you suggest would not be the way to fix the bug. The new option behavior you are requesting was already available in FF2. To do exactly what you request that new option to do, could be achieved by dis-choosing 'Show my windows and tabs from last time' and instead choosing 'Show a blank page' or 'Show my home page'.
> as this option would be the same as disabling "built-in session restore" AKA
> 'Show my windows and tabs from last time' and setting it to 'Show a blank page'
> instead.
>

In addition, you say "the simplest fix"... The fix just mentioned by me (and others before me), would "just" need the developers to replace the new code with the old one. Actually your suggestion would need them to write some whole new code in order to make FF remember that when the following is chosen:
'Show my windows and tabs from last time' = 'Clear Private Data' => 'session store' NOT checked
'Show a blank page' = 'Clear Private Data' => 'session store' IS checked
'Show my home page' = 'Clear Private Data' => 'session store' IS checked
//But nice: I see you have voted [thumbs up]

I still miss a answer from Simon Bünzli, to my question directed to him in my comment #51
If you have this trouble in the future, type ALT-F-X to close your browser. This will work until the folks at Mozilla screw that one up, too. :/
I don't know how Alt-F-X doesn't clear private data.  That seems like a bug.

You're free to disagree, but being a jerk and typing in all caps will not get you anywhere.  https://bugzilla.mozilla.org/page.cgi?id=etiquette.html might be good reading.  On the other hand, maybe not.
Status: RESOLVED → VERIFIED
After reading through the comments again after over a year, I have one more reason for this being valid:  
The user's choice to save their current session is more specific than the choice to clear private data, so it should be treated as an exception to the general rule.  
For example, if an HTML document refers to an external CSS file in its header, then has its own chunk of CSS defined, then has a tag somewhere in the body with its own CSS specified; then, first the external CSS is applied, then the more specific internal CSS (overriding the external), then finally the CSS in the specific tag is applied (again, overriding the previous CSS), so each more specific command overrides the more general ones.  I understand that this bug is not CSS, but shouldn't things in general work like that, where the specific overrides the general?

Also, I have a question for Mike Connor:
Since you marked this as "WONTFIX" instead of "INVALID", does that mean that if someone submits a well-coded patch, it will be accepted and the bug fixed?  
My understanding is that "WONTFIX" means that the module owners have much more important things to work on and don't want to work on it at all in the foreseeable future, sort of like giving it the hypothetical priority level P6 (with P5 being the lowest priority).
I think Mike Connor is making a bad argument by saying that users have explicitly chosen both options, and should therefore realize all of their consequences. Since the consequences aren't readily discoverable or obvious to the user now (nor were they prompted when they originally set the option back when it DID work as they expected, and now it has been silently changed up on them) his argument already can be reduced in merit. Furthermore, when the user later makes more immediate explicit choices in a UI (which can be taken to be an override of their past selections, or a special case) they either should get what they are being told is going to happen by the UI in the most immediate case, or that option shouldn't even be provided to them by the UI in the first place.  Given that Mike has decided that the former isn't going to be allowed, someone now needs to create a bug report to make sure the latter is implemented so that the UI is consistent.  He describes this in Comment 18.
The discussion misses the point. "Show all windows and tabs from the last time" is only selected (I think) on one's own computer, and only a complete idiot would leave a sensitive page up when closing a browser. If the browsing history is deleted but the current pages are restored, this is not inconsistent, because the previous pages in each tab are deleted. The result is that if it is used judiciously, it can be a very useful feature, combining the best of convenience with the best of privacy. I submit that this "bug" may in fact encourage people who want to restore their session to uncheck the option to clear the history, leading to page addresses getting stored indefinitely--the very privacy issue we want to avoid. If we want both options, give us both options. The rest of the history gets the ax.
Flags: blocking-firefox3.1?
Well, this is really a bug for me, so I would really like to see this fixed.

My suggestion would be to add "Close all tabs" to "Clear private data" options, like Opera has. If checked, tab history would be removed, if not, it would be possible to show tabs from last session.

Illustrated description: http://turpition.wordpress.com/2008/12/01/firefox-3-and-session-restore/
Flags: blocking-firefox3.1?
Blocks: 472018
No longer blocks: 472018
The argument about how to fix this bug seems to be divided between these two arguments:

1) Privacy overrides everything else, so if the user has selected to delete private data, then any actions they take which would override their preference (Save & Quit) should be ignored.

2) Save & Quit is an explicit choice by the user to ignore their own privacy settings and should be respected.

There also has been a lot of discussion about how to change settings to allow the browser to act as expected and save tabs.

Speaking from a user perspective, I was dismayed when my tabs no longer saved and thought something was seriously wrong. Add to this that there was a message in the error console that said "SessionStore: The session file is invalid: TypeError: this._initialState.windows[0] is undefined." Sounded like a bug to me, so I acted on it like one. I uninstalled plugins, downgraded to 3.0.3 instead of 3.0.5 and generally wasted several hours researching this.

But let's move on.

Since I'm not a developer, I don't understand why the last session could not simply load the last tabs from links (why would there be private data there?).

So how about this for a simple solution?

Simply edit the message box.

If a user's preferences are set to clear private data, and they try to close a window with multiple tabs, then the message box will look like the current one, with this edit: "Save & Quit (Note: Saving this session will not clear private data.)"

There. If they choose to save the session, they know private data is not cleared, and you are "allowed" to override their privacy settings. If they reconsider and want to clear private data anyway, they can choose Quit.

A simple edit like this could also be made in the settings panel where a user chooses privacy settings and session settings. When they have chosen to clear private data, then the option to save sessions should have a note like: "Saving tabs will not clear private data for these websites." Or something more specific.

What do you think?
> Simply edit the message box.
> 
> If a user's preferences are set to clear private data, and they try to close a
> window with multiple tabs, then the message box will look like the current one,
> with this edit: "Save & Quit (Note: Saving this session will not clear private
> data.)"
> 
> There. If they choose to save the session, they know private data is not
> cleared, and you are "allowed" to override their privacy settings. If they
> reconsider and want to clear private data anyway, they can choose Quit.
> 
> A simple edit like this could also be made in the settings panel where a user
> chooses privacy settings and session settings. When they have chosen to clear
> private data, then the option to save sessions should have a note like: "Saving
> tabs will not clear private data for these websites." Or something more
> specific.
> 
> What do you think?

I also think this is appropriate, except with one minor change, as I think it should only say  "Save & Quit (Note: Saving this session will not clear Browsing History)", because we don't need ALL of the private data to not be cleared, we only the Browsing History to not be cleared.  Any other private data should still be cleared on Save & Quit.

One other minor point, obviously, the part in parenthesis should only appear on the Save & Quit prompt when Browsing History is checked in the Clear Private Data settings.
While I'm glad this bug is still getting activity, I don't think the suggestion in #85 is really acceptable.  Warning the user in such a manner is ugly and only publicly exposes the unwillingness to fix the problem correctly, but it does not fix the problem.

The issue is that there is a cognitive gap between what the user expects to happen and what actually does happen.  This expectation is set up by the fundamentals of how the application behaves, and merely adding a message to areas where it does not behave as expected is a bad patch, not a fix.

A user expects that when they tell the application to do something, that it will do it.  In cases where both a general setting and a more specific setting are available, the user expects that the general setting takes effect UNLESS it is overridden by a more specific setting.  THAT is the problem and the cause of this bug... the general setting of "clear all data" does not follow this rule, and overrides the setting of "save my tabs", even though "save my tabs" is more specific.  

If one wants to remove session data, the option is already there: disable session restore.
I think the dialog issue is a separate bug.  This bug was originally about the conflict between the two prefs.  Obviously a specific decision overrides a general choice, we should solve that separately.  As reported, this bug remains WONTFIX.

If there isn't a bug about asking a question that we shouldn't ask, please file one.
@Mike Conner (#89):
Your reply is why I am so utterly confused about why this is marked "wontfix".  You have just agreed that a specific decision overrides a general choice, which is exactly the cause of this bug as originally reported, with the description of the unexpected behavior.

"Always clear private data" is a general setting because it applies to many aspects of the application, and the "specific decision" is the choice to remember the tabs from last time, because it applies to a smaller subset of the private data.  By your own logic, the specific "remember tabs" setting should override the general choice of "clear private data".
(In reply to comment #89)
> I think the dialog issue is a separate bug.  This bug was originally about the
> conflict between the two prefs.  Obviously a specific decision overrides a
> general choice, we should solve that separately.  As reported, this bug remains
> WONTFIX.
> 
> If there isn't a bug about asking a question that we shouldn't ask, please file
> one.

So should someone create a new bug report for "Dialog to Save & Quit is incomplete"?

Or are you suggesting that when the "Clear private data" option is used, then the dialog shouldn't ask to Save?
This bug, to me, was about the collision between the two prefs.  The dialog is a separate issue, and should get a bug to determine if we should save and preserve that session through the clearing case, or if we should show a modified dialog.
@Mattias:
Please do not report bugs or discuss anything else that is not *directly* related to this bug in the comments section.  Doing so only serves to pull the discussion of THIS bug further off track, and dilutes the discussion into a meandering, unfocused mess.

If you found a different bug, report it as a new bug elsewhere.
https://bugzilla.mozilla.org/show_bug.cgi?id=483566#c13 So this patch is currently going in. What I have understood the patch will nuke the session store every time when clearing browsing history on exit.

Like most users here, I don't think this is the expected behaviour. As an end user I don't see the connection between saving the session and clearing the browser history on exit and most definitely, when I select to clear history on exit I don't expect it to clear my session too.

While I can understand the privacy concerns with two these prefs I still don't see the conflict between the prefs, because like I said, I don't see the connection between the session saver and browsing history.
This bug remains WONTFIX despite all these comments, and it probably should be because it would definitely be a bad idea to ever NOT clear private data when that pref has been set.

Still, judging by the number of "such-and-such has been marked as a duplicate of this bug", this feature IS pretty much broken.  I have filed Bug 503564 to try to get around this problem.  Hope this helps.
Related to Bug 503564, I have created Bug 505548 in hopes that the preferences dialog is changed in order to make it clear to the user that the options of saving the session and clearing private data are contradictory.
Okay, now then it still doesn't make sense. When the window pops up warning that multiple tabs are open, then change the text on the button that says "Save and Quit". It is misleading. Or take it out, and just have the quit button. But it doesn't save. So just take out that button when the preference is set to clear data on shutdown.
Someone in the IRC channel pointed out a workaround (sorry if this is already mentioned):
Untick "Browsing history" from the "Settings for Clearing History" dialog for when Firefox closes.
THEN untick "Remember my browsing history for ..."

This will apparently still allow the "Save and Quit" prompt or the "Show my windows and tabs from last time" setting to work.
You need to log in before you can comment on or make changes to this bug.