Closed evilaliv3 closed 3 years ago
Supposing 2: setting the HTTP
Referrer-Policy
header to the valueno-referrer
is equivalent to set therel
property of any HTML link served within the request to the valuenoopener
(is this statement correct?)
No, it's not.
Is it correct to expect that setting the HTTP
Referrer-Policy
header would obtain exactly same result of setting therel
any HTML link served within the request to the valuenoreferrer noopener
No it's not, because as you said no relationship between the HTTP Referrer-Policy
header and the window.opener value in the target browsing context is stated anywhere by the specs.
However, depending on your use case, this might not be a big deal, since any link with target="_blank" defaults to noopener.
thank you so much @hackademix
i got probably confused in my first ipothesis (header set to no-referrer equal rel=noreferrer), but i understand from what you say that they are not related at all
They are related in that rel=noreferrer
takes precedence, but that's about it. You might want to look at Cross-Origin-Opener-Policy
.
Thank you @annevk, this advice is really helpful. I just looked at your suggestion and we are going to immediately implement it.
Hello,
i've doubt about relation to
Referrer-Policy
header and its relation with link rel attribute that i could not find described in any spec and i would welcome your clarification.Supposing 1: setting the
rel
property of an HTML link to the valuenoreferrer
is equivalent to set the same attribute tonoreferrer noopener
(becausenoreferrer
impliesnoopener
as stated explicitly stated in the specsSupposing 2: setting the HTTP
Referrer-Policy
header to the valueno-referrer
is equivalent to set therel
property of any HTML link served within the request to the valuenoopener
(is this statement correct?)Is it correct to expect that setting the HTTP
Referrer-Policy
header would obtain exactly same result of setting therel
any HTML link served within the request to the valuenoreferrer noopener
Thank you!