HTML <iframe> referrerpolicy eigenschap
Definitie en gebruik
referrerpolicy
De eigenschap bepaalt de referentie-informatie die moet worden gestuurd bij het verkrijgen van de iframe.
Voorbeeld
Specificatie dat er geen referrer-informatie wordt meegestuurd met de verzoek:
<iframe src="https://codew3c.com/" referrerpolicy="no-referrer"></iframe>
Syntaxis
<iframe referrerpolicy="no-referrer|no-referrer-when-downgrade|origin|origin-when-cross-origin|same-origin|strict-origin-when-cross-origin|unsafe-url">
Eigenschapswaarde
Waarde | Beschrijving |
---|---|
no-referrer | Referentie-informatie wordt niet meegezonden met de verzoek. |
no-referrer-when-downgrade | Standaard. Als er geen HTTPS is, zal de referentiehoofding niet naar de bron worden gestuurd. |
origin | Alleen protocol, host en poortinformatie sturen naar de verzoeker. |
origin-when-cross-origin |
Voor cross-domain verzoeken: alleen stuur protocol, host en poortinformatie. For same-origin requests: also include path information. |
same-origin |
Send referrer information for same-origin requests. Do not send referrer information for cross-domain requests. |
strict-origin |
Send referrer information only when the security level is the same (e.g., HTTPS to HTTPS). Do not send to less secure destinations (e.g., HTTPS to HTTP). |
strict-origin-when-cross-origin |
Send complete path information when making cross-origin requests. Send only the source site information when the security level remains unchanged (e.g., HTTPS to HTTPS). Do not send any header information to less secure target sites (e.g., HTTPS to HTTP). |
unsafe-url |
Send source, path, and query string information (but not including fragments, passwords, or usernames). This value is considered insecure. |
Browser support
The numbers in the table indicate the first browser version to fully support this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
51.0 | 79.0 | 50.0 | 11.1 | 38.0 |