- From: Charlie Reis <creis@chromium.org>
- Date: Tue, 25 Sep 2012 11:55:28 -0700
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: whatwg@lists.whatwg.org
On Mon, Sep 24, 2012 at 5:48 PM, Boris Zbarsky <bzbarsky@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@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
Received on Tuesday, 25 September 2012 18:55:54 UTC