Re: [whatwg] Proposal for Links to Unrelated Browsing Contexts

On Wed, Aug 29, 2012 at 3:01 PM, Charlie Reis <creis@chromium.org> wrote:

> On Tue, Aug 28, 2012 at 9:39 AM, Glenn Maynard <glenn@zewt.org> wrote:
> > I had to do this recently (a script-initiated rel=noreferrer
> navigation).  FYI, I worked around it by creating a temporary
> HTMLAnchorElement, setting its href and rel properties and calling click().
>  A way to do this directly with window.open would be nice, but it's
> orthogonal to noreferrer vs. unrelated.
>
> That's a fair point, actually.  It would be possible to use noreferrer
> from script code (if somewhat inelegant).
>

Do you mean the "create an HTMLAnchorElement" hack is inelegant?  No
argument there (which is why a way to do this with window.open would be
nice). I don't know if it's inelegant enough to justify doing that, though
(not something I'd bother to push for, myself), and it does seem to satisfy
the use case of using noreferrer and unrelated from scripts.

It's also worth noting that this proposal's cleaner syntax for window.open
> has no way to block the referrer if that's what the developers wanted.
>  That means they'd have to choose between cleaner window.open syntax that
> passes the referrer or the workaround approach that blocks it.
>

This proposal seemed to be effectively passing a "rel" value into
window.open, which means you could say window.open("url", "target",
"unrelated noreferrer").

To be honest, I haven't heard strong enough support for the allow-referrer
> case to justify this proposal on the basis of "cleaner syntax" alone.
>  Maybe we should table the discussion unless a stronger use case arises?
>

(I don't have a personal need for rel=external, or even a complete
understanding of the use cases, but it does seem orthogonal to noreferrer.)

-- 
Glenn Maynard

Received on Friday, 31 August 2012 22:28:45 UTC