How can I get a new browser session when opening a new tab or window on Firefox/Chrome?
2014-07
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 on IE.
How can I get a new browser session when opening a new tab or window on Firefox?
How about Google Chrome?
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/
It seems that there is a handy chrome extension called "Session Buddy" that does just this
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.
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.
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.
This Firefox extension allows that:
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:
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/
With firefox this solution worked like a charme!!
http://www.fusioncube.net/index.php/multiple-sessions-firefox
It's almost the same of what 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
Chrome is bringing multi profile. Already available in canary builds. You can switch profile instantly.
Whenever I click a link from something like outlook or a program opens a web page (not when I click a link from within chrome). It opens up in Chrome since it is my default browser but if I already have a page open it will open in a new tab on that same window. I can't tell you how many times I forget about this and close the window out, accidentally losing the other tab too. Ofcourse, I can open a new chrome window and find it under recently closed tabs but I would really just prefer if they opened in their own window so I can prevent this.
There doesn't appear to be a user-friendly option to change this inside Chrome (presumably because most people prefer the new tab).
However, you can change this manually by editing the command specified in your Windows registry used to open an http url.
To do this, open regedit and:
- Go to
HKEY_CLASSES_ROOT\http\shell\open\command
- You should see one key, named
(Default)
. Double click this to get an editing popup. - At the end of the
Value data:
field you should see the text-- "%1"
. Change this to--new-window "%1"
.
That will instruct Windows to open all http links in a new window of Chrome instead of a new tab.
Presumably, the same general idea is true for Mac and Linux, but I don't know offhand where they store the command to open urls.
Problem
For Linux, if you have multiple VNC servers, this same problem will occur.
That is,
$ google-chrome
Created new window in existing browser session
And no google chrome window will appear in the current X VNC session (a new tab will appear in the X session with the first instance of google-chrome).
Solution
A simple workaround is to run
$ google-chrome "--user-data-dir=${HOME}/.google-chrome/session${DISPLAY}"
This sets a unique user directory based on the X VNC instance in use. The user directory will be created as needed. The new google-chrome process will display within the current X VNC session.
Mike Hardy posted a solution for Mac OS X. I'm using it in 10.7 Lion and it works fine.
The solution involves a small AppleScript application:
on open location theURL
tell application "/Applications/Google Chrome.app"
make new window
activate
set URL of active tab of first window to theURL
end tell
end open location
Setting this application as your default browser will cause external program links to open in a new window in Chrome.
In case any Linux users are wondering the same thing, I did this by copying /usr/share/applications/chromium.desktop
to ~/.local/share/applications
and then editing it as follows:
--- /usr/share/applications/chromium.desktop 2012-08-10 17:02:01.000000000 +0100
+++ /home/sam/.local/share/applications/chromium.desktop 2012-08-23 10:33:21.987359591 +0100
@@ -128,7 +128,7 @@
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
-Exec=/usr/bin/chromium %U
+Exec=/usr/bin/chromium --new-window %U
Terminal=false
X-MultipleArgs=false
Type=Application
If you're using the Debian chromium
package, and you don't mind setting this as the default for all users on the system, you can instead edit /etc/chromium/default
and add --new-window
to the CHROMIUM_FLAGS
variable.
You can use the "New Tab, New Window" extension for this. They way it works is moving the newly created tab quickly to a new window. So there is a bit of redrawing, but it does work pretty well (for me at least).
Note, as @John mentions below, this extension makes the default behavior for all new tabs (even ones created from inside Chrome).
With a Macbook and Chrome browser, this extension works great for opening a new window and NOT opening a tab:
https://chrome.google.com/webstore/detail/new-tab-new-window/dndlcbaomdoggooaficldplkcmkfpgff