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

53

11

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?

Mercer Traieste

Posted 2009-07-15T09:57:46.733

Reputation: 2 112

5IE 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 – 2010-03-24T18:14:10.113

Answers

14

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/

Robert Ivanc

Posted 2009-07-15T09:57:46.733

Reputation: 608

@JesseGlick The same seems to be happening in Firefox. – user502144 – 2015-11-25T11:39:43.047

Using the IE tab is just like using another browser, and won't work in most operating systems. – WhyNotHugo – 2010-05-03T06:24:40.563

@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. – BlueMonkMN – 2017-02-15T19:29:58.273

Many web applications will fail to operate as expected under private browsing mode. – sammarcow – 2017-05-18T16:28:42.680

@sammarcow never experienced a problem. Why would they? It's the same, just that cookies and history never gets persisted to disk. – Robert Ivanc – 2017-05-19T14:37:11.107

@RobertIvanc if they user service workers, that will not work in incognito mode – sureshvv – 2018-04-23T09:51:26.240

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. – Robert Ivanc – 2009-07-16T19:10:50.257

2Doesn't Firefox's private browsing session close the current session though? so you can only have one session in Firefox. – Sam Hasler – 2009-07-15T12:43:42.883

12Unfortunately 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. – Jesse Glick – 2013-02-01T21:07:49.400

This is as close as it gets, and i will accept this. Thanks! – Mercer Traieste – 2009-07-19T16:31:32.413

run "C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -ProfileManager for FFX as suggested in Shawn's answer – Aprillion – 2013-05-29T11:26:51.160

9

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:

galacticninja

Posted 2009-07-15T09:57:46.733

Reputation: 5 348

1Tried it, works flawlessly! – That Brazilian Guy – 2013-11-22T23:44:24.373

6

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

Carl

Posted 2009-07-15T09:57:46.733

Reputation: 211

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.

Mercer Traieste

Posted 2009-07-15T09:57:46.733

Reputation: 2 112

5This is for the "current windows and tabs" definition of session, not the "active cookies" definition that the OP is looking for. – Ben V – 2015-08-28T17:52:28.293

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

Hemanth

Posted 2009-07-15T09:57:46.733

Reputation: 131

Or --temp-profile – Ciro Santilli 新疆改造中心法轮功六四事件 – 2017-10-02T12:04:50.873

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.

Shawn

Posted 2009-07-15T09:57:46.733

Reputation: 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.

Ian Mckay

Posted 2009-07-15T09:57:46.733

Reputation: 96

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 – 2017-01-16T09:01:56.910

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.

random

Posted 2009-07-15T09:57:46.733

Reputation: 13 363

I've opened 3 different sessions with incognito and it works fine :) – Adi Mor – 2012-12-16T06:31:51.387

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/

Brad

Posted 2009-07-15T09:57:46.733

Reputation: 4 459

That doesn't look like a Chrome extension, plus it's Windows-only. – Michael Teper – 2015-09-16T23:37:20.833

@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: https://bitbucket.org/bradisbell/new-chrome-session

– Brad – 2015-09-16T23:39:47.643

1

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

user

Posted 2009-07-15T09:57:46.733

Reputation: 1 853

0

ddreian

Posted 2009-07-15T09:57:46.733

Reputation: 101

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

kubi

Posted 2009-07-15T09:57:46.733

Reputation: 1

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.

elijabaley

Posted 2009-07-15T09:57:46.733

Reputation: 21

1This can also be done with firefox.exe -no-remote -p "profilename". – Bob – 2012-03-06T11:13:31.897

-3

CHROME MULTI SOCIAL LOGINS OR EMAILS AND ETC.. SIMPLE EXTENSION!

THIS WILL OPEN EACH NEW TAB AS NEW CHROME BROWSER (UID) JUST CLICK ( + ) BUTTON AND CHECK NAME OF NEW TAB WITH UNIQUE UID IDENTIFIER.

AWESOME TOOL... FORGET ABOUT GHOSTBROWSER PAID VERSION AND BLA BLA BLA.

https://chrome.google.com/webstore/detail/multilogin/nknfhhmhoflkcijaodalbncnmidocced/related?hl=en

Marcel FourFxbroker

Posted 2009-07-15T09:57:46.733

Reputation: 1

*WHY ARE YOU YELLING*?!?!?!?! – Pierre.Vriens – 2018-02-14T18:08:35.263

I am going to treat this as spam. – Ramhound – 2018-02-14T19:34:42.293