לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

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

  • 12 תגובות
  • 12 have this problem
  • 172 views
  • תגובה אחרונה מאת COMSAT1

more options

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)

פתרון נבחר

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

כל התגובות (12)

more options

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

more options

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.

more options

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

more options

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.

השתנתה ב־ על־ידי cor-el

more options

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.

more options

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.

more options

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 :)

more options

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.
more options

פתרון נבחר

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.

more options

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!

more options

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. ??

more options

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.