How can I get a new browser session when opening a new tab or window on Firefox/Chrome?

213,810

Solution 1

In Chrome you can use private browsing to achieve the same.

Chrome - Wrench(tools) menu/open new window without history

In Firefox you can use IE tab extension, and have another tab rendered with an IE engine to achieve the same effect.

Here are some other options: http://www.computer-realm.net/managing-multiple-gmail-accounts-with-firefox/

Solution 2

As of Firefox 57 AKA Firefox Quantum, the Firefox Multi-Account Containers extension (developed by Mozilla) will allow you to use multiple accounts on the same website, with a different account per tab or window.

Under the hood, it separates website storage into tab-specific Containers. Cookies downloaded by one Container are not available to other Containers. With the Firefox Multi-Account Containers extension, you can...

  • Sign in to two different accounts on the same site (for example, you could sign in to work email and home email in two different Container tabs.
  • Keep different kinds of browsing far away from each other (for example, you might use one Container tab for managing your Checking Account and a different Container tab for searching for new songs by your favorite band)
  • Avoid leaving social-network footprints all over the web (for example, you could use a Container tab for signing in to a social network, and use a different tab for visiting online news sites, keeping your social identity separate from tracking scripts on news sites)

After installing the Firefox Multi-Account Containers extension, click the Containers icon to edit your Containers. Change their colors, names, and icons. Long-click the new tab button to open a new Container tab.


Firefox versions prior to 57 can use:

Multifox

Multifox is an extension that allows Firefox to connect to websites using different user names. Simultaneously!

For example, if you have multiple Gmail accounts, you can open them all at the same time. Each Firefox window, managed by Multifox, accesses an account without interfering each other

Each Multifox window is flagged with a number indicating the identity profile. Logins made in windows with different numbers are isolated.

Logins are preserved the same way they are in “regular” windows. Even if you close the window or quit Firefox.

The identity profile of each window is preserved when Firefox restores the session.

It can also easily switch between profiles:

Solution 3

I am not expert in this topic, I found some interesting thing while surfing in Internet and also see that it is not mentioned in any of the answers already posted. Hope it will be helpful for someone!

If you want to open completely new session using chrome in Windows. Enter below command in Command Prompt app in Windows after creating Chrome_dev_session directory in C drive

chrome.exe --user-data-dir="C:/Chrome_dev_session"

It is as clean as chrome window you opened for the first time after you installed it. It may be a bit laborious task to create directory and enter this command every time you want to open new session but has been very useful for me.

Extra Reading: I used below command to disable CORS (Cross Origin Resource Sharing) in my Computer while testing some feature:

chrome.exe --user-data-dir="C:/Chrome_dev_session" --disable-web-security

Solution 4

This answer answers specifically the question/user case described here: Chrome - Open separate browser windows, each in incognito mode, that do not share data between. However, that question is locked since it is marked as a duplicate, pointing to this question, so I can't post an answer there.

For Google Chrome, if you want a simple way to have a new browser window with a new, temporary session (that is not sharing cookies with other sessions/windows), invoking a simple script can do the trick.

(Opening a new window in incognito mode gives ju one more session, however, further incognito windows will belong to that same session - so normal mode + incognito mode will give you at most two separate sessions in total, regardless of number of windows.)

I use the following. It's written for OS X. It further opens the window in incognito mode. Simply drop --incognito if that's not desired.

#!/bin/sh
RND_DIR=/tmp/$RANDOM
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=$RND_DIR --incognito
rm -R $RND_DIR

Solution 5

It seems that there is a handy Chrome extension called "Session Buddy" that does just this:

enter image description here

Session Buddy is a flexible session management extension that allows you to easily save, edit, and restore your browser sessions.

  • Quickly save the current session from the Session Buddy interface or from the right-click menu on any web page.
  • Flexible restore options allow restore of sessions into the original set of windows, a single window, or the current window.
  • Automatic capture of your 10 most recent sessions is especially handy for recovering a session after a browser or system crash.
  • Name and edit your saved sessions with ease.
  • Populate a session from a simple list of URLs.
  • Export a session to text or CSV format (more formats in development).
  • Control the types of tabs that Session Buddy recognizes.
  • Keyboard shortcuts make working with sessions a snap.
Share:
213,810

Related videos on Youtube

Mercer Traieste
Author by

Mercer Traieste

I'm just a regular power user.

Updated on September 17, 2022

Comments

  • Mercer Traieste
    Mercer Traieste over 1 year

    When opening new Internet Explorer window, a new browser session is issued. Therefore you can login with two different accounts on the same service (let's say Gmail). The same does not apply when opening a new tab in the same window in Internet Explorer.

    How can I get a new browser session when opening a new tab or window on Firefox?

    How about Google Chrome?

    • Admin
      Admin about 14 years
      IE 8 does not open new windows in a new session, at least not by default. However, it has a handy-dandy "New Session" command in the File menu. You can also get a new session by adding the -nomerge option to the command line, e.g. of a shortcut.
  • Sam Hasler
    Sam Hasler almost 15 years
    Doesn't Firefox's private browsing session close the current session though? so you can only have one session in Firefox.
  • Robert Ivanc
    Robert Ivanc almost 15 years
    ups, you're right, haven't noticed that. :( I guess than he can use the IE Tab extension for this purpose although it is less than ideal.
  • Mercer Traieste
    Mercer Traieste almost 15 years
    This is as close as it gets, and i will accept this. Thanks!
  • Speederer
    Speederer about 14 years
    Using the IE tab is just like using another browser, and won't work in most operating systems.
  • tvdo
    tvdo about 12 years
    This can also be done with firefox.exe -no-remote -p "profilename".
  • Adi Mor
    Adi Mor over 11 years
    I've opened 3 different sessions with incognito and it works fine :)
  • MaxPower
    MaxPower about 11 years
    Unfortunately it seems that in Chrome while a private browser window will operate in a new session, all such windows are in the same session—for a total of two.
  • Aprillion
    Aprillion almost 11 years
    run "C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -ProfileManager for FFX as suggested in Shawn's answer
  • That Brazilian Guy
    That Brazilian Guy over 10 years
    Tried it, works flawlessly!
  • Ben V
    Ben V over 8 years
    This is for the "current windows and tabs" definition of session, not the "active cookies" definition that the OP is looking for.
  • Michael Teper
    Michael Teper over 8 years
    That doesn't look like a Chrome extension, plus it's Windows-only.
  • Brad
    Brad over 8 years
    @MichaelTeper What makes you think it doesn't look like a Chrome extension? And yes, it's Windows only. Chrome extensions aren't allowed to execute their own processes so it requires a process outside of Chrome to start up a new Chrome in the new context. In any case, this has been re-written to be simpler (as a non-extension) and you can get the updated source code here: bitbucket.org/bradisbell/new-chrome-session
  • user502144
    user502144 over 8 years
    @JesseGlick The same seems to be happening in Firefox.
  • Ramhound
    Ramhound over 7 years
    Please stop spamming the same chrome extension. A single answer, and flagging other questions as duplicates, is the proper way to answer multiple questions with the same answer.
  • BlueMonkMN
    BlueMonkMN about 7 years
    @JesseGlick In my experience, just looking at the session cookies going to an incognito browser window, it appears that something a little different is going on, at least in my test. The incognito window gets its own session, and every request starts a new session because no cookies are submitted to retain the same session, that is if the server is using cookies to track the session.
  • Bomi Chen
    Bomi Chen almost 7 years
    Many web applications will fail to operate as expected under private browsing mode.
  • Robert Ivanc
    Robert Ivanc almost 7 years
    @sammarcow never experienced a problem. Why would they? It's the same, just that cookies and history never gets persisted to disk.
  • Ciro Santilli Путлер Капут 六四事
    Ciro Santilli Путлер Капут 六四事 over 6 years
    Or --temp-profile
  • Pierre.Vriens
    Pierre.Vriens about 6 years
    WHY ARE YOU YELLING?!?!?!?!
  • Ramhound
    Ramhound about 6 years
    I am going to treat this as spam.
  • sureshvv
    sureshvv about 6 years
    @RobertIvanc if they user service workers, that will not work in incognito mode
  • Suncatcher
    Suncatcher about 4 years
    @CiroSantilli冠状病毒审查六四事件法轮功 temp profile doesn't work anymore, just tried on version 80.0.3987.163 (Official Build) (64-bit)
  • Ciro Santilli Путлер Капут 六四事
    Ciro Santilli Путлер Капут 六四事 about 4 years
    @Suncatcher I also have 80.0.3987.163, what do you observe? Seems to work for me, e.g. I can get two separate stack Oveflow logins.
  • Suncatcher
    Suncatcher about 4 years
    I start via --temp-profile and it opens with my Google account already logged in chrome, with all of my extensions. If you able to log into Stack with two logins maybe it's just separate cookies/content for some websites, but it is not real incognito