62

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?

1
  • 5
    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.
    – Martha
    Mar 24, 2010 at 18:14

13 Answers 13

17

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/

11
  • 2
    Doesn't Firefox's private browsing session close the current session though? so you can only have one session in Firefox.
    – Sam Hasler
    Jul 15, 2009 at 12:43
  • 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. Jul 16, 2009 at 19:10
  • This is as close as it gets, and i will accept this. Thanks! Jul 19, 2009 at 16:31
  • Using the IE tab is just like using another browser, and won't work in most operating systems.
    – WhyNotHugo
    May 3, 2010 at 6:24
  • 16
    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. Feb 1, 2013 at 21:07
16

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:

1
9

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
4
  • Or --temp-profile Oct 2, 2017 at 12:04
  • 1
    @CiroSantilli冠状病毒审查六四事件法轮功 temp profile doesn't work anymore, just tried on version 80.0.3987.163 (Official Build) (64-bit)
    – Suncatcher
    Apr 8, 2020 at 12:37
  • @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. Apr 8, 2020 at 13:07
  • 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
    – Suncatcher
    Apr 8, 2020 at 13:49
8

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
4

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.
1
  • 8
    This is for the "current windows and tabs" definition of session, not the "active cookies" definition that the OP is looking for.
    – Ben V
    Aug 28, 2015 at 17:52
3

By creating multiple profiles in the profile manager (firefox -p from start menu) and then creating a MOZ_NO_REMOTE environment variable with a value of 1, Firefox will allow multiple sessions in multiple windows.

I've tried it myself with Firefox 8 and it works. I have an web application that has no logout button, and before I found this I had to keep opening and closing Firefox completely to switch between accounts (admin and user for testing). This has helped greatly.

2

For Google Chrome, you can set a shortcut to open up an Incognito session via the following:

"C:\path-to\chrome.exe" /incognito

Or simply CTRL + Shift + N while using the normal state. Only difference is that when you're incognito, the cookies and history won't stick.

1
  • I've opened 3 different sessions with incognito and it works fine :)
    – Adi Mor
    Dec 16, 2012 at 6:31
2

I have created a Chrome Extension that does this for cookies per site. It's available here:

https://chrome.google.com/webstore/detail/lone-tab/dlgodcdpmjmeegcakjjldfobmooajhhe

When turned on, this will lock each tab into it's own session. Let me know if you have any questions about this.

1
  • 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.
    – Ramhound
    Jan 16, 2017 at 9:01
1

I have made a Chrome extension that allows you to use multiple Gmail accounts (and other accounts) by launching Chrome in a new session.

It is called New Chrome Session, and you can download it here: http://www.musatcha.com/software/NewChromeSession/

2
  • That doesn't look like a Chrome extension, plus it's Windows-only. Sep 16, 2015 at 23:37
  • @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
    – Brad
    Sep 16, 2015 at 23:39
1

Chrome is bringing multi profile. Already available in canary builds. You can switch profile instantly.

0

With Firefox the solution in Enable multiple sessions in Firefox worked like a charm!!

It's almost the same as proposed in the answer by "Shawn", "MOZ_NO_REMOTE environment variable with a value of 1". It adds an advice for creating multiple links on desktop for opening the different Firefox sessions.

1
  • 1
    This can also be done with firefox.exe -no-remote -p "profilename".
    – Bob
    Mar 6, 2012 at 11:13
0

Use Firefox Containers https://blog.mozilla.org/firefox/introducing-firefox-multi-account-containers/ and try out Temporary Containers https://addons.mozilla.org/en-US/firefox/addon/temporary-containers/

0

The easiest way for me was to create an empty folder and use Firefox's --profile command line argument, like so:

mkdir /tmp/ff
firefox --profile /tmp/ff

On Linux and probably on OSX. On Windows, in cmd:

mkdir c:\tmpff
"C:\Program Files\Mozilla Firefox\firefox.exe" --profile c:\tmpff

In the latter, obviously adjust paths accordingly. Tested with FF43 on Win7.

And then delete the folder. Or chain it, if you have to do it again and again:

rm -rf /tmp/ff && mkdir /tmp/ff && firefox --profile /tmp/ff

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .