X
Tap here to go to the mobile version of the site.

Support Forum

How do I open an external link in an active private window?

Posted

When I open a link from another application and I am using Private Mode in Firefox -- and the private window is the most recent active window in Firefox -- how can I make firefox open the link in the private window?

To clarify by example: Firefox is my default browser. I am browsing in private mode and I want to open links from an email in my OS's mail client so they open in the private window (ideally in a new tab in the private window), not a non-private window. At the moment, external links open in a non-private window no matter what.


There was a time that Firefox would do this, but it does not do it any more. I think I may have killed this function the last time I reset Firefox. Is it possible that I had changed a setting in about:config to make Firefox behave how I want it to? If so, which setting is it!

FWW. I have tried changing the following preferences in about:config with no success:

browser.link.open_newwindow.overtide.external browser.link.open_newwindow.restriction

I've also found something like this mentioned in bug reports, but I'm not sure if I understand the resolution. If I do, then the resolution is that opening in a non-private window no matter what is intentional and there is no desire to add an option to change this behavior in Firefox. However, what seems to be missing from these reports is the fact that the Private window is the active window. It seems to me that links should always open in the active window, even if the active window is a private window, if the browser is commanded to do so. Otherwise, the browser is not behaving as expected.

Technical info:

Mac OS 10.11.4 Firefox 46.0b11 (yes, the beta channel)

When I open a link from another application and I am using Private Mode in Firefox -- and the private window is the most recent active window in Firefox -- how can I make firefox open the link in the private window? To clarify by example: Firefox is my default browser. I am browsing in private mode and I want to open links from an email in my OS's mail client so they open in the private window (ideally in a new tab in the private window), not a non-private window. At the moment, external links open in a non-private window no matter what. There was a time that Firefox would do this, but it does not do it any more. I think I may have killed this function the last time I reset Firefox. Is it possible that I had changed a setting in about:config to make Firefox behave how I want it to? If so, which setting is it! FWW. I have tried changing the following preferences in about:config with no success: browser.link.open_newwindow.overtide.external browser.link.open_newwindow.restriction I've also found something like this mentioned in bug reports, but I'm not sure if I understand the resolution. If I do, then the resolution is that opening in a non-private window no matter what is intentional and there is no desire to add an option to change this behavior in Firefox. However, what seems to be missing from these reports is the fact that the Private window is the active window. It seems to me that links should always open in the active window, even if the active window is a private window, if the browser is commanded to do so. Otherwise, the browser is not behaving as expected. Technical info: Mac OS 10.11.4 Firefox 46.0b11 (yes, the beta channel)

Chosen solution

Hi COMSAT1, I researched this in the bug tracking system, and it seems that when private browsing was changed from all-or-none to window-by-window in Firefox 20, this came up during testing. It was decided that users would find it arbitrary that external links open private or non-private based on the last active window, so there is code to override that default behavior and ignore private windows in deciding where to open external links. (bug #829180)

Some later bugs were filed proposing to give users a choice (all private, all non-private) but they were all rejected.

I couldn't find an add-on that modifies this behavior. The Private Tab extension mentioned by cor-el originally followed the "last active window" method but after a bug report was filed, the developer decided to follow Firefox's default behavior.

It's interesting that other browsers do it differently. Sometimes Firefox changes to match what competitors do if it's an issue for a lot of users. I guess one question is whether others users of other browsers prefer it that way like you do.

Read this answer in context 1

Additional System Details

Installed Plug-ins

OpenH264 Shockwave Default Browser Helper Silverlight Plug-in

Application

  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.14 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.14

More Information

JoshNiesler 0 solutions 18 answers

Helpful Reply

Hello COMSAT1,

These steps should be what you're looking for;

  • Visit about:config
  • Click "Yes, I'll be careful"
  • Search for "browser.privatebrowsing.autostart"
  • Toggle the "Value" to "True"

This will make all new windows open in Private Mode by default.

Best, Josh

Hello COMSAT1, These steps should be what you're looking for; * Visit about:config * Click "Yes, I'll be careful" * Search for "browser.privatebrowsing.autostart" * Toggle the "Value" to "True" This will make all new windows open in Private Mode by default. Best, Josh

Question owner

Thanks for the response but this is not what I am asking about. I don't want to open all windows in Private Mode. Let me draw your attention to the example I gave in my question:

To clarify by example: Firefox is my default browser. I am browsing in private mode and I want to open links from an email in my OS's mail client so they open in the private window (ideally in a new tab in the private window), not a non-private window. At the moment, external links open in a non-private window no matter what.

Maybe I should add that if I am not browsing in Private Mode, then I do not expect windows to open in a Private Mode.

Maybe this should be filed as a bug? It makes no sense as expected behaviour.

Thanks for the response but this is not what I am asking about. I don't want to open all windows in Private Mode. Let me draw your attention to the example I gave in my question: To clarify by example: Firefox is my default browser. I am browsing in private mode and I want to open links from an email in my OS's mail client so they open in the private window (ideally in a new tab in the private window), not a non-private window. At the moment, external links open in a non-private window no matter what. Maybe I should add that if I am '''not''' browsing in Private Mode, then I do not expect windows to open in a Private Mode. Maybe this should be filed as a bug? It makes no sense as expected behaviour.
JoshNiesler 0 solutions 18 answers

While this would be an awesome feature, I don't think its actually possible.

You see, Windows handles protocols (default programs), not Firefox. But Windows doesn't go as far as to support conditional protocols.

As you've got it set, Windows will always open web links in "firefox.exe".

Windows can't do this: If_Firefox_private_window_open = Open_link_in_private_window If_Firefox_private_window_not_open = Open_link_normally

I also doubt we'll see this kind of feature anytime soon in Windows. In the meantime, you might just have to copy and paste that link manually.

The same thing goes for Chrome, IE, and other browsers. Its a Windows problem. Sorry :(

Best, Josh

While this would be an awesome feature, I don't think its actually possible. You see, Windows handles protocols (default programs), not Firefox. But Windows doesn't go as far as to support ''conditional'' protocols. As you've got it set, Windows will ''always'' open web links in "firefox.exe". Windows ''can't'' do this: ''If_Firefox_private_window_open = Open_link_in_private_window'' ''If_Firefox_private_window_not_open = Open_link_normally'' I also doubt we'll see this kind of feature anytime soon in Windows. In the meantime, you might just have to copy and paste that link manually. The same thing goes for Chrome, IE, and other browsers. Its a Windows problem. Sorry :( Best, Josh
cor-el
  • Top 10 Contributor
  • Moderator
17470 solutions 157895 answers

You can use an extension to get Private Browsing mode support per tab.

Private Browsing mode tabs get a dashed underline You can toggle Private Browsing mode on/off via the right-click context menu of a tab

You can look at this pref once you have installed the above mentioned extension:

  • extensions.privateTab.allowOpenExternalLinksInPrivateTabs

You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

You can use an extension to get Private Browsing mode support per tab. *https://addons.mozilla.org/firefox/addon/private-tab/ Private Browsing mode tabs get a dashed underline You can toggle Private Browsing mode on/off via the right-click context menu of a tab You can look at this pref once you have installed the above mentioned extension: *extensions.privateTab.allowOpenExternalLinksInPrivateTabs You can open the <b>about:config</b> page via the location/address bar. You can accept the warning and click "I'll be careful" to continue. *http://kb.mozillazine.org/about:config

Modified by cor-el

jscher2000
  • Top 10 Contributor
8690 solutions 71040 answers

Helpful Reply

I can't speak to Mac.

On Windows, Firefox adds a pre-set command line to the Windows registry under

  • HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command
  • HKEY_CLASSES_ROOT\FirefoxURL\shell\open\command

If you change the -url in the command line to -private-window -- from

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint -url "%1"

to

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint -private-window "%1"

-- then all external links launch in a private window.

But it sounds as though you need more flexibility than that.

I can't speak to Mac. On Windows, Firefox adds a pre-set command line to the Windows registry under * HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command * HKEY_CLASSES_ROOT\FirefoxURL\shell\open\command If you change the -url in the command line to -private-window -- from "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint '''-url''' "%1" to "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint '''-private-window''' "%1" -- then all external links launch in a private window. But it sounds as though you need more flexibility than that.

Question owner

Thank you all for your answers. As jscher acknowledges, I am using a mac. I'm not sure what changed. Firefox used to do this on my system and I'm not sure if that was default behavior or if I made some changes via the about:config page. If I did, those settings are gone because I no longer have my old profile.

Josh- Even though you mention Windows, I wonder if this is an OS thing. Most of my system modifications would have been reset around the same time I noticed this (which was also the same time that I reset Firefox, hence my uncertainty about the cause). I'll look into it.

Thank you all for your answers. As jscher acknowledges, I am using a mac. I'm not sure what changed. Firefox used to do this on my system and I'm not sure if that was default behavior or if I made some changes via the about:config page. If I did, those settings are gone because I no longer have my old profile. Josh- Even though you mention Windows, I wonder if this is an OS thing. Most of my system modifications would have been reset around the same time I noticed this (which was also the same time that I reset Firefox, hence my uncertainty about the cause). I'll look into it.
JoshNiesler 0 solutions 18 answers

Sorry COMSAT1! I didn't see that you were using OS X!

I don't have much experience with Mac, so I'm not sure how protocols work there. Hopefully a Mac expert can jump in and help :)

Sorry COMSAT1! I didn't see that you were using OS X! I don't have much experience with Mac, so I'm not sure how protocols work there. Hopefully a Mac expert can jump in and help :)

Question owner

I'm 99% certain that this is a Firefox issue because it does not happen in any other browser aside from Firefox. Safari, Chrome, Opera all behave as expected.

Just for clarification, I'll describe the problem again.

This is what currently happens:

  1. Firefox is my default browser
  2. I am browsing in Private mode in Firefox. The Private window is the active window in Firefox.
  3. I click a link in another application (like a text editor)
  4. The link opens in a non-private window.

What I expect to happen

  1. Because of my browser settings, I expect the link to open in a new tab in the active Private window.
I'm 99% certain that this is a Firefox issue because it does not happen in any other browser aside from Firefox. Safari, Chrome, Opera all behave as expected. Just for clarification, I'll describe the problem again. '''This is what currently happens:''' # Firefox is my default browser # I am browsing in Private mode in Firefox. The Private window is the active window in Firefox. # I click a link in another application (like a text editor) # The link opens in a non-private window. '''What I expect to happen''' # Because of my browser settings, I expect the link to open in a new tab in the active Private window.
jscher2000
  • Top 10 Contributor
8690 solutions 71040 answers

Chosen Solution

Hi COMSAT1, I researched this in the bug tracking system, and it seems that when private browsing was changed from all-or-none to window-by-window in Firefox 20, this came up during testing. It was decided that users would find it arbitrary that external links open private or non-private based on the last active window, so there is code to override that default behavior and ignore private windows in deciding where to open external links. (bug #829180)

Some later bugs were filed proposing to give users a choice (all private, all non-private) but they were all rejected.

I couldn't find an add-on that modifies this behavior. The Private Tab extension mentioned by cor-el originally followed the "last active window" method but after a bug report was filed, the developer decided to follow Firefox's default behavior.

It's interesting that other browsers do it differently. Sometimes Firefox changes to match what competitors do if it's an issue for a lot of users. I guess one question is whether others users of other browsers prefer it that way like you do.

Hi COMSAT1, I researched this in the bug tracking system, and it seems that when private browsing was changed from all-or-none to window-by-window in Firefox 20, this came up during testing. It was decided that users would find it arbitrary that external links open private or non-private based on the last active window, so there is code to override that default behavior and ignore private windows in deciding where to open external links. (bug #829180) Some later bugs were filed proposing to give users a choice (all private, all non-private) but they were all rejected. I couldn't find an add-on that modifies this behavior. The Private Tab extension mentioned by cor-el originally followed the "last active window" method but after a bug report was filed, the developer decided to follow Firefox's default behavior. It's interesting that other browsers do it differently. Sometimes Firefox changes to match what competitors do if it's an issue for a lot of users. I guess one question is whether others users of other browsers prefer it that way like you do.

Question owner

Thanks jscher2000. I'm going to look that up - it sounds like the bug report I came across before posting this query. I wasn't sure if I understood it correctly. If we're looking at the same thing, then I assume I did!

Maybe people don't mind either way or maybe they just don't use private browsing? I find Firefox's behavior to be confusing. The odd thing is that I'm sure this did not happen a year ago. I know sometimes it takes time for code changes to make it to a live browser, but not that long!

Thanks jscher2000. I'm going to look that up - it sounds like the bug report I came across before posting this query. I wasn't sure if I understood it correctly. If we're looking at the same thing, then I assume I did! Maybe people don't mind either way or maybe they just don't use private browsing? I find Firefox's behavior to be confusing. The odd thing is that I'm sure this did not happen a year ago. I know sometimes it takes time for code changes to make it to a live browser, but not that long!
jscher2000
  • Top 10 Contributor
8690 solutions 71040 answers

As far as I can tell, it has been this way since Firefox 20, which would be quite a long time now. However, if you use any tab-related extensions, maybe one of those has a setting for this that got "unset" at some point. ??

As far as I can tell, it has been this way since Firefox 20, which would be quite a long time now. However, if you use any tab-related extensions, maybe one of those has a setting for this that got "unset" at some point. ??

Question owner

jscher2000, I think you are right. This is currently expected behavior in Firefox, so I will mark this as solved.

I think you are also right that somehow this behavior somehow got unset. As I mentioned, I think this started when I reset Firefox.

Thank you for the help!

FWW I've asked for the bug to be reopened.

jscher2000, I think you are right. This is currently expected behavior in Firefox, so I will mark this as solved. I think you are also right that somehow this behavior somehow got unset. As I mentioned, I think this started when I reset Firefox. Thank you for the help! FWW I've asked for the bug to be reopened.