--- title: Referrer-Policy slug: Web/HTTP/Headers/Referrer-Policy tags: - Cabecera - HTTP - Respuesta - privacidad translation_of: Web/HTTP/Headers/Referrer-Policy ---
La cabecera Referrer-Policy
de HTTP determina qué datos de referente, de entre los que se envían con la cabecera {{HTTPHeader("Referer")}}, deben incluirse con las solicitudes realizadas.
Tipo de cabecera | {{Glossary("Response header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
Observe que {{HTTPHeader("Referer")}} es una falta de ortografía; en inglés, la palabra correcta es referrer. La cabecera Referrer-Policy
no contiene esta falta.
Referrer-Policy: no-referrer Referrer-Policy: no-referrer-when-downgrade Referrer-Policy: origin Referrer-Policy: origin-when-cross-origin Referrer-Policy: same-origin Referrer-Policy: strict-origin Referrer-Policy: strict-origin-when-cross-origin Referrer-Policy: unsafe-url
https://ejemplo.com/pagina.html
enviará el referente https://ejemplo.com/
.Directiva | Documento | Navegación a | Referente |
---|---|---|---|
no-referrer |
https://ejemplo.com/pagina.html | cualquier dominio o ruta de acceso | ningún referente |
no-referrer-when-downgrade |
https://ejemplo.com/pagina.html | https://ejemplo.com/otrapagina.html | https://ejemplo.com/pagina.html |
no-referrer-when-downgrade |
https://ejemplo.com/pagina.html | https://mozilla.org | https://ejemplo.com/pagina.html |
no-referrer-when-downgrade |
https://ejemplo.com/pagina.html | http://ejemplo.org | ningún referente |
origin |
https://ejemplo.com/pagina.html | cualquier dominio o ruta de acceso | https://ejemplo.com/ |
origin-when-cross-origin |
https://ejemplo.com/pagina.html | https://ejemplo.com/otrapagina.html | https://ejemplo.com/pagina.html |
origin-when-cross-origin |
https://ejemplo.com/pagina.html | https://mozilla.org | https://ejemplo.com/ |
origin-when-cross-origin |
https://ejemplo.com/pagina.html | http://ejemplo.com/pagina.html | https://ejemplo.com/ |
same-origin |
https://ejemplo.com/pagina.html | https://ejemplo.com/otrapagina.html | https://ejemplo.com/pagina.html |
same-origin |
https://ejemplo.com/pagina.html | https://mozilla.org | ningún referente |
strict-origin |
https://ejemplo.com/pagina.html | https://mozilla.org | https://ejemplo.com/ |
strict-origin |
https://ejemplo.com/pagina.html | http://ejemplo.org | ningún referente |
strict-origin |
http://ejemplo.com/pagina.html | cualquier dominio o ruta de acceso | http://ejemplo.com/ |
strict-origin-when-cross-origin |
https://ejemplo.com/pagina.html | https://ejemplo.com/otrapagina.html | https://ejemplo.com/pagina.html |
strict-origin-when-cross-origin |
https://ejemplo.com/pagina.html | https://mozilla.org | https://ejemplo.com/ |
strict-origin-when-cross-origin |
https://ejemplo.com/pagina.html | http://example.org | ningún referente |
unsafe-url |
https://ejemplo.com/pagina.html?q=123 | cualquier dominio o ruta de acceso | https://ejemplo.com/pagina.html?q=123 |
Especificación | Estado |
---|---|
Directiva de referentes | Anteproyecto de editores |
The compatibility table in 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.
{{Compat("http.headers.Referrer-Policy")}}
Notas:
about:config
para permitir a los usuarios definir su directiva Referrer-Policy
predeterminada: network.http.referer.userControlPolicy
.network.http.referer.defaultPolicy
y network.http.referer.defaultPolicy.pbmode
.Los valores posibles son:
no-referrer
same-origin
strict-origin-when-cross-origin
no-referrer-when-downgrade
(la predeterminada)referrer
.referrerpolicy
en un elemento {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("img")}}, {{HTMLElement("iframe")}} o {{HTMLElement("link")}}.noreferrer
en un elemento a, area o link (rel="noreferrer"
).«Un mayor control sobre sus referentes» en el blog de seguridad de Mozilla