Open Bug 999754 Opened 6 years ago Updated 1 year ago

[meta] implement referrer attribute for navigation and embedding elements


(Core :: DOM: Core & HTML, enhancement, P2)





(Reporter: geekboy, Unassigned)


(Depends on 1 open bug, Blocks 1 open bug)


(Keywords: meta)

Like the rel=noreferrer (bug 530396) attribute for links and the referrer control offered at a document level in bug 704320 and bug 965727, we should allow web devs to set the referrer "level" for links, iframes and other embedding/navigating loads.  This would basically be a special case of the document-level referrer policy offered by CSP or <meta referrer= for an individual element.

I propose we use the same syntax as meta/CSP, but scope it to the element via a "referrer" attribute on the tag.
I'd argue that there is a use case for providing a finer-grained referrer.

Let's take an example. On Twitter, if someone tweets a link to my blog and people visit my blog via the tweet appearing on their timeline, the referrer I see is very likely the timeline page referrer (, more or less because there is no choice.
On the side of my blog, I see undifferenciated traffic from, but have no idea which tweet specifically brought me traffic (and I'm interested, because I can engage with the people who tweeted about my blog, respond to their critics, etc.)

It'd be nice, if Twitter had a mechanism to set the tweet permalink as referrer of a link to a webpage, so I know who's been interested in my blog posts.
It looks like this bug is very close to suggesting such a mechanism.
Makes sense, David.  For now (since there's no spec I know of on this feature) I'd like to match it up to another feature closer to standardization; but there's no reason we couldn't explore adding a literal/spoofed referrer as an option in the future.
This should be proposed on the WHATWG list first.
Also, if you plan on implementing:
Assignee: sstamm → nobody
Assignee: nobody → franziskuskiefer
Depends on: 1166910
Franziskus, could you please address comment 4? Also, I'm not sure this specification is really what we want for referrer:
Summary: implement referrer attribute for navigation and embedding elements → [meta] implement referrer attribute for navigation and embedding elements
Assignee: franziskuskiefer → nobody
Priority: -- → P2
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.