This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.
The HTMLLinkElement
.referrerPolicy
property reflect the HTML referrerpolicy
attribute of the <link>
element defining which referrer is sent when fetching the resource.
See the HTTP Referrer-Policy
header for details.
Syntax
DOMString HTMLLinkElement.referrerPolicy
Example
var links = document.getElementsByTagName("link"); links[0].referrerPolicy; // "no-referrer"
Specifications
Specification | Status | Comment |
---|---|---|
Referrer PolicyThe definition of 'referrerPolicy attribute' in that specification. | Candidate Recommendation |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
referrerPolicy
|
Chrome
Full support 51 |
Edge
Full support 79 |
Firefox
Full support 50 |
IE
No support No |
Opera
Full support 38 |
Safari
Full support 11.1 |
WebView Android
Full support 51 |
Chrome Android
Full support 51 |
Firefox Android
Full support 50 |
Opera Android
Full support 41 |
Safari iOS
No support No |
Samsung Internet Android
Full support 5.0 |
Legend
- Full support
- Full support
- No support
- No support
See also
- HTTP header
Referrer-Policy
HTMLAnchorElement.referrerPolicy
HTMLAreaElement.referrerPolicy
HTMLIFrameElement.referrerPolicy
HTMLImageElement.referrerPolicy
HTMLLinkElement.referrerPolicy by Mozilla Contributors is licensed under CC-BY-SA 2.5.