Closed Bug 343876 Opened 18 years ago Closed 2 years ago

Session restore when all last sessions tabs were closed should obey user homepage choice for the initial blank tab

Categories

(Firefox :: Session Restore, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: sciguyryan, Unassigned)

References

(Blocks 1 open bug)

Details

If you close all the tabs in a session (presuming the tab bar always remains active and there should be one blank tab remaining) then close the brother window. When Firefox is re-opened the blank tab will load as it was in the last session.

Would it not make more sence to use this blank tab to load the users homepage choice (if set) as a blank tab is pretty muse useless as a start point.
If you're talking about the case of browser.sessionstore.resume_session=true (restore session always), the change suggested in bug 340898 should take care of this.
Component: Tabbed Browser → Session Restore
QA Contact: tabbed.browser → session.restore
I think it should do this even if the tab bar is auto-hidden when there's only one tab (browser.tabs.autoHide=true).

For me, logically Ctrl+W means "I'm done with this page, close the tab".  The only time I want Firefox to restore my session is where I used File->Exit, the Restart in the Add-Ons dialog, or if Firefox crashed.

Bug 340898 is marked as fixed1.8.1 in August last year, which I understand is the Firefox 2.x branch, yet the behavior I'm talking about doesn't happen in the latest Firefox 2.x (2.0.0.3).
Mike: There's a point that restoring a single blank tab isn't too useful. OTOH that's what the Session Restore feature's UI text ("restore my windows and tabs from last time") currently implies - and that's BTW what Opera (9.1) does as well.

Having browser.windows.loadOnNewWindow actually do something (even without UI and set to 0 per default) would give us a setting to fall back on in this case which users bugged by the current behavior could at least change without having to install an extension. (see also bug 269664 which might further help with IE7 parity)

On a different note: parts of the issue mentioned by comment #2 are tracked in bug 380953.
Keywords: uiwanted
(In reply to comment #3)
> Mike: There's a point that restoring a single blank tab isn't too useful. OTOH
> that's what the Session Restore feature's UI text ("restore my windows and tabs
> from last time") currently implies - and that's BTW what Opera (9.1) does as
> well.

FWIW, the current behavior is actually optimal for me, since I don't use a home page and like to start a new browsing session with a blank slate--err, tab--that I then load something into.

But I don't know how common this is.  I may be the exception rather than the rule.
Sorry, yes, using the home page rather than a blank page would suit me just fine.

Myk, do you also set your home page to about:blank, or do you use the home page for another purpose?
> Myk, do you also set your home page to about:blank, or do you use the home page
> for another purpose?

I don't set my home page to about:blank or anything else, I leave it on the default setting.

I just don't use it at all, i.e. I never press the "home" button on the toolbar (although I haven't bothered to remove it from the toolbar), nor does my browser ever go to the home page on startup (since I've told it to "show my windows and tabs from last time").

Basically, I don't use it for any purpose, and Firefox never displays it to me.
Note: despite my personal preference, if opening to the home page makes sense for the majority of users (as I suspect it does), then we should do that, and users like me who prefer opening to a blank page should be directed to configure our home page to be the blank page.

Also, I think the behavior being requested here is probably not dependent on the value of browser.tabs.autoHide, since in both cases the user has closed all pages before (or in the process of) quitting the browser.
(From bug 380953 comment #6)
> 1. A browsing session doesn't consist exclusively of its tabs. One further
> notable aspect is the list of recently closed tabs inside a window. Should that
> list still be restored or discarded as well?
> 
> 2. The other two startup options are "Show my home page" and "Show a blank
> page". Why would the first automatically trump the latter?

Maybe a better solution for what is requested in this bug and in bug 380953 would be to implement a way to selectively resume a session while defaulting to not resuming anything (as proposed e.g. in bug 381068).

Besides, I wouldn't try to be too clever about how we behave when told to restore the windows and tabs from last time. We won't get it right for everybody anyway, and you should be able to fine-tune the behavior through extensions anytime...
Simon,

I'm quite happy with the idea of session restore happening by default and would rather not be prompted.
The latest nightly (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081123 Minefield/3.1b2pre) seems to be doing exactly what I want.

:-)
Is this still happening? (in trunk builds)
Yes, I'm experiencing this under Iceweasel 7.0.1. Some discussion happened on a duplicate ( #490136 ).
Bug 490136 is not quite a duplicate of this bug. For bug 490136 the last tab closed isn't necessarily blank, while this bug talks about the last tab being blank. I agree with both bug reports, but they are distinct use cases.
OK, I see the difference. In that case, I am not seeing this bug. When I close the last tab, there is no blank tab remaining. It seems that Firefox's behavior with tabs changed and that with the new behavior, bug 490136 replaces this bug. I consider the new problem more annoying.
Verified on:
Build identifier: Mozilla/5.0 (Windows NT 6.1; rv:12.0a1) Gecko/20120104 Firefox/12.0a1

and the bug from comment 0 doesn't happen anymore. The Home page is opened when closing Firefox with just a blank tab opened, then reopening it.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
(In reply to Ioana Budnar [QA] from comment #16)
> Verified on:
> Build identifier: Mozilla/5.0 (Windows NT 6.1; rv:12.0a1) Gecko/20120104
> Firefox/12.0a1
> 
> and the bug from comment 0 doesn't happen anymore. The Home page is opened
> when closing Firefox with just a blank tab opened, then reopening it.

So as reported, it "works" but that's due to a discrepancy between closing the last window & quitting through the menu. And the reason it "works" is actually because there's an error reading the file at startup (there are no windows saved, but the file is still written. in fact try having a separate window open first, then closing it with tabs open then the STR)

The bug is also still present when quitting through the menu.

All-in-all it's still messy :/
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I'd argue that we should restore whatever the state was, including if the state was a blank tab. Especially seen in context of the (upcoming) home tab, this will be even less of an issue.
Keywords: uiwanted
And what do you want to restore if the user closed the last tab (e.g. with Ctrl+W)?
I think opening the homepage would be the best solution in this case..
(In reply to Christian Stadelmann from comment #19)
> And what do you want to restore if the user closed the last tab (e.g. with
> Ctrl+W)?
> I think opening the homepage would be the best solution in this case..

That is bug 999469
See Also: → 492383
See Also: → 1321406

This should be solved, if explicitly closed tabs are considered 'closed' and thus do not show up on session restore.
You all may want to have a look at my summary: https://bugzilla.mozilla.org/show_bug.cgi?id=490136#c26

Users still bothered with this issue might want to set the flag browser.tabs.closeWindowWithLastTab to false to get a fresh tab on closing the last tab. Quit after that and you'll have a fresh session next time you open Firefox, although 'restore previous session' on startup is activated.

Bug 490136 is currently assigned. That fix is related to this issue and may solve the problem.

With Firefox 107 (current Nightly) I set Firefox to restore the previous session on start and created a window with only one blank tab. I closed the tab with control-W and the browser closed. I restarted with the same profile and the home page opened. (I tested with the standard home page and a custom home page.)

Status: REOPENED → RESOLVED
Closed: 13 years ago2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.