By default, when you close the last open tab in Firefox, the entire browser closes. If you’d rather be able to close the web page on the last open tab without closing Firefox, there’s a simple setting you can disable.

Instead of closing the browser when you close the last tab, disabling this setting will make the last tab reopen and display the New Tab page. Maybe you don’t want to end your browsing session, because you want to be able to reopen closed tabs (the list of recently closed tabs resets when you close the browser). Or, maybe you just want to quickly access the new tab page on the last open tab.

The setting we’re going to disable is not in the standard Firefox settings. Don’t worry, though. It’s easy to find and change. To access this setting, enter

        about:config
    

in Firefox’s address bar and then press Enter.

01_entering_about_config_in_address_bar

A message displays saying that this might void your warranty and you should only continue if you’re sure of what you’re doing. As long as you follow our instructions, you’ll be fine, so click “I’ll be careful, I promise” to continue.

02_void_your_warranty_screen

Start typing

        closeWindowWithLastTab
    

in the Search box to find the setting. The

        browser.tabs.closeWindowWithLastTab
    

setting should display. By default, it’s set to "true" which will close the browser when you close the last tab.

03_setting_closewindowwithlasttab_setting_to_false

To disable this setting, double-click on it. You’ll see the Value change to “false” and the entire setting displays in bold, indicating the Value is not set to the default.

04_closewindowwithlasttab_setting_set_to_false

Now, click on the “Close tab” button on the last open tab in Firefox.

05_clicking_close_tab_button

Firefox stays open and the last open tab reopens and displays the New Tab page. If you change your mind and want to have Firefox close when you close the last tab, simply double-click this setting again to change the Value back to "true".