HTML <iframe> with referrerpolicy Attribute
HTML <iframe> with referrerpolicy Attribute
The referrerpolicy
attribute specifies whether or not to sent http referrer information.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<iframe src="/js" referrerpolicy="no-referrer-when-downgrade">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
Attribute Value
In the below table:
The From heading column refers to the page that contains an <iframe>
The To heading column refers to the source (src) of an <iframe>
The Referrer heading column refers to the page that will be sent as a referrer to the source (src) of an <iframe>.
Policy | From | To | Referrer |
---|---|---|---|
no-referrer | https://example.com/page.html | any domain or path | no referrer |
no-referrer-when-downgrade | https://example.com/page.html | https://example.com/otherpage.html | https://example.com/page.html |
no-referrer-when-downgrade | https://example.com/page.html | https://wikimass.com | https://example.com/page.html |
no-referrer-when-downgrade | https://example.com/page.html | http://example.org | no referrer |
origin | https://example.com/page.html | any domain or path | https://example.com/ |
origin-when-cross-origin | https://example.com/page.html | https://example.com/otherpage.html | https://example.com/page.html |
origin-when-cross-origin | https://example.com/page.html | https://wikimass.com | https://example.com/ |
origin-when-cross-origin | https://example.com/page.html | http://example.com/page.html | https://example.com/ |
same-origin | https://example.com/page.html | https://example.com/otherpage.html | https://example.com/page.html |
same-origin | https://example.com/page.html | https://wikimass.com | no referrer |
strict-origin | https://example.com/page.html | https://wikimass.com | https://example.com/ |
strict-origin | https://example.com/page.html | http://example.org | no referrer |
strict-origin | https://example.com/page.html | any domain or path | http://example.com/ |
strict-origin-when-cross-origin | https://example.com/page.html | https://example.com/otherpage.html | https://example.com/page.html |
strict-origin-when-cross-origin | https://example.com/page.html | https://wikimass.com | https://example.com/ |
strict-origin-when-cross-origin | https://example.com/page.html | http://example.org | no referrer |
unsafe-url | https://example.com/page.html?q=56789 | any domain or path | https://example.com/page.html?q=56789 |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.