-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style(eslint): allow referrers in target="_blank" links #11867
Conversation
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to express a different view. Even if we do not leak paths and query strings to the target site, it is still leaking something that not all users are comfortable with. The general consensus seems to be that noreferrer
is best practice. Falling back to the default behaviour of Referrer-policy
is mainly a SEO inprovement for the target site. Or did I miss something here?
In any case, even if we do that, I would prefer an explicit Referrer-Policy
header then, to make our intent explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, however either in this PR or a followup we should go through and remove all our rel="noreferrer"
s
+1 for aligning the links in a follow-up PR |
Summary
Problem
We currently add
rel="noreferrer"
to all external links in our client, which has two effects:rel="noopener"
(see here).However, there is no reason to hide MDN as the referrer, because the default
Referrer-Policy
applies, so that the destination only seeshttps://developer.mozilla.org/
.Solution
Update the ESLint config for the
client/
and allow referrers in thereact/jsx-no-target-blank
rule.Note: The rule will still require
noopener
instead.How did you test this change?
Made the change in #11865 and it had the effect.