This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Cari Bantuan

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Pelajari Lebih Lanjut

How to pass an URL to Firefox and open that URL in a new tab?

  • 6 balas
  • 14 memiliki masalah ini
  • 7 kunjungan
  • Balasan terakhir oleh Gabriel M

more options

I want to send an URL to an existing firefox window and open that URL in a new tab. How can I open the new tab? There is a command line switch or something?

Thanks

I want to send an URL to an existing firefox window and open that URL in a new tab. How can I open the new tab? There is a command line switch or something? Thanks

Semua Balasan (6)

more options

Hello,

First open the link in a new tab in the same window, then you click and hold the tab , drag and drop in the other window.

Thanks

more options

No, not manually. I want to do it programatically. There is a command line switch or something? Like Firefox.exe -newtab -www.test.com

-

Sorry, it wasn't obvious from the question.

more options

Go to Menu Bar, Tools, Web Developer, Developer toolbar or press Shift+F4

In the Scratchpad, type: window.open('http://google.com','_self') //"self" for the same window window.open('http://google.com','_blank') /* "blank" for a new window, but to open in a new window is necessary declare the sizes

more options

Is Firefox your default browser? If you ask Windows to open a URL, it should open in the default browser. You can test by typing or pasting a URL into the Start menu search box.

Or if you prefer to use a more complete command line, see: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options


Next part is, does the page open:

  • in a new tab in the last active window
  • in the last active tab, replacing the page
  • in a new window

This is determined by various Firefox preferences. You can check yours here:

In a new tab, type or paste about:config and press Enter. Click the button promising to be careful.

In the search box that appears above the list, type or paste link.o and pause while the list is filtered.

(A) browser.link.open_newwindow

3 = divert new window to a new tab (default)
2 = allow link to open a new window
1 = force new window into same tab

The checkbox in Options > Tabs toggles between 3 and 2

(B) browser.link.open_newwindow.restriction - for links in Firefox tabs

0 = apply the setting under (A) to ALL new windows (even script windows)
2 = apply the setting under (A) to normal windows, but NOT to script windows with features (default)
1 = override the setting under (A) and always use new windows

(C) browser.link.open_newwindow.override.external - for links in other programs

-1 = apply the setting under (A) to external links (default)
3 = open external links in a new tab in the last active window
2 = open external links in a new window
1 = open external links in the last active tab replacing the current page

So by default, you would see external links open in a new tab in the last active window.

more options

There is the -new-tab command line as listed in the MDN article switch that you can use.

Diperbarui oleh cor-el pada

more options

@toddy_victor and @jscher - This is still manually, not programatically. @cor-el - Thanks man! I think this is what I need!!!!!!