Ways to open links in new tabs




Tabbed Browser
13 years ago
12 years ago


(Reporter: Ben Goodger (use ben at mozilla dot org for email), Assigned: Ben Goodger (use ben at mozilla dot org for email))


Firefox Tracking Flags

(Not tracked)


It would be nice if we can find a way to open links in a new tab from page content. 

Exposing a mechanism through script is one way, but some kind of link target is

The problem with using target e.g. <a target="_tab" ..> is that while that works
for creating an anonymous new tab, currently <a target="foo" ..> opens a new
window with name "foo" and all subsequent links targeted at "foo" will open at
it, and there seems to be no easy way of doing that since the attribute is
overloaded. Perhaps it could depend on the "Force links" preference. 

What do people think?

Comment 1

13 years ago
_tab was WONTFIX'ED in bug 105409, but we need to do something anyway

Maybe with "target-new" ? See
<http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target-new> (which is
highly controversial).

Comment 2

13 years ago
I'm a little wary of us creating Gecko-specific extensions to HTML, it's
specifically what web developers generate hate about Internet Explorer. Adding
something like <a target="_tab" ..>, which only Firefox would respect seems like
a step backwards for standards compliance (which after all, is one of MoFo's
goals, IIRC).

I'm in favour of relying on the force links preference. It lets every user
decide exactly how they want links to open.

Comment 3

13 years ago
Also I forgot to mention, the target attribute is invalid in strict document
types anyway. (Sorry for bugspam)

Comment 5

13 years ago
This looks to me like a dup of bug 105409.
This is already possible with target="_blank".

*** This bug has been marked as a duplicate of 105547 ***
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
OK.  One last time -- web pages should not EVER open up tabs if the user doesn't
want to see them.  Just like the should not ever open up windows if the user
doesn't want to see those.

The whole idea here is to empower the user, not the web page designer.  Given
that we have a setup in place (done by danm) that empowers the user in exactly
this way, it's not clear to me why we're still discussing the issue...
You need to log in before you can comment on or make changes to this bug.