About rel=noopener (2016)
mathiasbynens.github.io
mathiasbynens.github.io
Or do I need to tag all my links with a long series of "Don't allow this crazy thing", "Or that other thing", etc.
In an ideal world, these apps would have been rewritten a long time ago using more modern techniques. In reality, browsers bend over backwards to maintain backward compatibility with existing apps.
Since this is still a problem, I'd say the web needs a way to gracefully migrate away from bad decisions like window.opener being available across origins.
Should we not decide that cross-origin window.opener is now deprecated, show big fat warnings on the developer console when it's used, and remove it in a year or two? I'd like an option to completely turn it off on my browser. Like third-party cookies, cross-origin access to just about anything is a bad idea.
I suspect the cost of breaking web compatibility intentionally to accomplish this goal would kill a browser, as authentication, payment, and many other things would suddenly break.
https://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).a...
I doubt this behaviour comes purely under html anyway as its only usable from the javascript environment.
More likely is a content security policy... oh looke there: https://w3c.github.io/webappsec-csp/#directive-disown-opener
Or mobile: https://m.xkcd.com/927/
Version # is not the phrase you want to overload. HTML5 is the latest version and was released 4 years ago.
That does nothing for deployed sites that aren't actively developed? Browser devs have decided those sites are worth not breaking.
If browsers enforce HTTPS in a similar way, I don't see why they shouldn't enforce better security elsewhere as well.
Browsers deprecate security related features all the time. See SSL, HSTS [EDIT: HPKP*], etc.
At the very least, browsers could remain backward compatible but mark the URI as “Insecure” in the address bar if the link could result in tab hijacking. Although on second thought, that would be challenging because it would require parsing the source of all links.
HSTS is what tells the browser "this website MUST be served over TLS".
HPKP is what tells the browser "this website must be served over TLS with this exact key".
HPKP is being deprecated due to the large "footgun" it creates for websites, and the difficulty at actually managing it. It's being replaced by "Expect-CT" which is a much easier and safer way of getting a similar result.
Expect-CT is very different, I'm not sure "similar result" is the right phrase. HPKP lets you pin to any set of keys, a reasonable choice might be your current key, a spare key that your DevOps have ready to go, and one more that's printed out on a piece of paper in the company safe labelled "important: Web site private key, never lose this".
Expect-CT is like Python's from future import, in the future we expect the Web PKI to use Certificate Transparency logging policy to ensure oversight over all CAs. Expect-CT lets you demand enforcement of such policy today, to the extent that's possible. Today policy is still in a state of flux, so enforcing it might not do what you expect, whereas HPKP was very predictable. On the other hand, it's definitely not subject to hostage taking, and it's probably less susceptible to footguns, so that's nice. And if the future does come to pass as expected it's future proof, since such a policy will become de facto the normal behaviour of common user agents.
[Edited to make more sense]
More about the performance "benefit" here: https://jakearchibald.com/2016/performance-benefits-of-rel-n...
But in the real world most websites don't do this. What likely matters to the user is that the page they're navigating to opens faster; the user likely doesn't care about the performance of the hidden tab they just came from.
Of course, `noopener` has security and privacy benefits which may outweigh the performance costs (if there are any).
I've seen this article (OP) a few times already, and it keeps reminding me to add rel="noopener noreferrer" on whatever site/system I'm working with at the time. In fact I just did that yesterday when I saw this article, to set up a way to automatically add it for external links, in my current dev workflow.
* I also don't understand how this is being served. If you go to https://github.com/mathiasbynens there should be a repository called mathiasbynens.github.io right? But I can't find it.
Not exactly - the subdomain is the account and the path name is the repository (and the repository's `gh-pages` branch is what's returned).