[whatwg] Proposal for Links to Unrelated Browsing Contexts

Charlie Reis creis at chromium.org
Tue Sep 25 11:55:28 PDT 2012


On Mon, Sep 24, 2012 at 5:48 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>
> On 9/24/12 8:42 PM, Mihai Parparita wrote:
>>
>> On Mon, Sep 24, 2012 at 12:11 PM, Ian Hickson <ian at hixie.ch> wrote:
>>
>>> Why does GMail need to use window.open()? Surely the right way to
expose a
>>> link is to use <a href="">. What is forcing them to use window.open()?
>>>
>>
>> I can't speak for Gmail, but Google Reader uses window.open since it
allows
>> "unrelated" links to be opened in response to a key event (the "v"
keyboard
>> shortcut).
>
>
> In most UAs this is also possible to do with a click() on the HTML <a>,
no?  In the ones in which it's _not_ possible that way, they should add it,
perhaps?
>
> -Boris

That seems reasonable to me.  I'm following up with people from Gmail to
confirm that they could move to that approach.

It sounds like the main benefits of using window.open + opener=null +
redirect were:
1) Not passing the referrer (before rel=noreferrer existed).
2) Having centralized logic so that other developers wouldn't forget to
block the referrer on new links.

Using click() on an <a rel=noreferrer target=_blank> tag seems to
accomplish the same thing, so hopefully that will be a reasonable way
forward.

Charlie



More information about the whatwg mailing list