Repository navigation
Add a new "referrer attribute" delivery mechanism - #175
Conversation
This delivery mechanism is meant to subsume the rel="noreferrer" link type defined in the HTML5 spec: https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer This would allow for the following use case: - I don't want any referrers to be sent (i.e. global policy of "no-referrer" delivered via <meta> or CSP) - except for these two links that should reveal the origin of the referring page (i.e. local policy of "origin" on the two <a> elements)
6a25a32 to
0394a3d
Compare
|
@mikewest I think I've addressed all of the feedback from the list. |
|
I think we should not do this and pursue https://www.w3.org/Bugs/Public/show_bug.cgi?id=26533 instead. We cannot keep adding request variables everywhere forever. |
|
Well, either way we'd need to implement it as a parameter to Fetch, right? The question is whether we'd allow all of those parameters to live together in a single attribute (which makes sense to me). I don't see any problem landing this to signal the direction we want to work in, iff we add another issue to the doc pointing at that bug, and work with Hixie, et al. to get whatever we end up with added to HTML. |
|
Do you mean that instead of having a referrer attribute, it should be part of some JSON blob inside a src-options attribute? If so, I don't think that is a good idea at all. 1. src-options being a JSON string means that it becomes yet another attack vector for XSS (you have to JSON escape things, and then attribute escape them). 2. For authors, the referrer attribute is much better ergonomically, and web developer ergonomics is more important than specification or implementation ergonomics (this is in the HTML design principles). For those reasons, I expect the src-options stuff is going to get a lot of pushback from anywhere it will tried to be applied to, not just referrer. We should block progress on the referrer spec on src-options. Per-element referrer control is blocking other important improvements to the referrer spec. We should go ahead and add the referrer attribute to the editor's draft now, and if/when src-options becomes a preferable alternative, we can switch the spec to that assuming that happens in a reasonable timeframe. |
0394a3d to
4e1b7ff
Compare
|
I've addressed @briansmith's concerns about the precedence by turning that paragraph into an issue. I have also pruned the list of allowed values based on his comment to that effect. |
There was a problem hiding this comment.
Is there any reason to limit to just these three? It might make sense to support all of the following here: no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, unsafe-url
I only need the three listed at the moment.
Edit: oh I see you changed this in fmarier@705c9b4 . Makes sense. It does shift responsibility to the publisher to enforce but I suppose that is ok.
|
I agree with @briansmith regarding https://www.w3.org/Bugs/Public/show_bug.cgi?id=26533 It seems like a lot of work which will be prone to error to specify this in a JSON blob. I would like to see this PR land as it meets my needs for being able to override the per-document global policy for just a few links. LGTM |
Add a new "referrer attribute" delivery mechanism
|
We'll run with it for the moment, and see if the other bug resolves in a way that folks are happy with. If not, Thanks, @fmarier! |
|
Hi, would you confirm that this will support hierarchical inheritance and override in DOM structure? |
|
@WooseokJeong It works kinda like that except not with a |
|
got it, thanks |
RICG template updates.
This delivery mechanism is meant to subsume the rel="noreferrer"
link type defined in the HTML5 spec:
https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer
This would allow for the following use case:
"no-referrer" delivered via or CSP)
referring page (i.e. local policy of "origin" on the two elements)