[whatwg] Proposal for Links to Unrelated Browsing Contexts

Glenn Maynard glenn at zewt.org
Fri Aug 31 15:28:16 PDT 2012


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

> On Tue, Aug 28, 2012 at 9:39 AM, Glenn Maynard <glenn at 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



More information about the whatwg mailing list