REFERRER_POLICY

enum
Data Display

TypeScript enum for the HTML referrerpolicy attribute — controls how much referrer information is sent with image requests.

TypeScript

Définition

La définition TypeScript telle qu'elle apparaît dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Membres

Membres

Tous les membres de cet enum. Cliquez sur une valeur pour la copier dans le presse-papiers.

REFERRER_POLICY.NO_REFERRER
No Referer header is sent with requests.
REFERRER_POLICY.NO_REFERRER_WHEN_DOWNGRADE
Full URL sent to same-security-level origins; no Referer on downgrade (HTTPS → HTTP).
REFERRER_POLICY.ORIGIN
Only the origin (scheme + host + port) is sent, never the path or query string.
REFERRER_POLICY.ORIGIN_WHEN_CROSS_ORIGIN
Full URL for same-origin requests; only the origin for cross-origin requests.
REFERRER_POLICY.SAME_ORIGIN
Full URL sent only to same-origin destinations; no Referer header cross-origin.
REFERRER_POLICY.STRICT_ORIGIN
Origin sent when same security level; no Referer on downgrade.
REFERRER_POLICY.STRICT_ORIGIN_WHEN_CROSS_ORIGIN
Full URL for same-origin; origin only cross-origin; nothing on downgrade. Browser default.
REFERRER_POLICY.UNSAFE_URL
Full URL always sent — leaks path and query string even cross-origin. Use with care.

Écosystème

Utilisé par

Composants et props qui acceptent cet enum comme valeur.

Usage

Exemples

Extraits de code prêts à coller utilisant cet enum.

Using the enum in script setup

typescript