ReferrerPolicy

enum ReferrerPolicy : ProtocolMessageEnum
Specifies a policy to apply via the `Referrer-Policy` header. All policy docs come from MDN.
Protobuf enum elide.page.Context.ReferrerPolicy

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Default referrer policy - i.e. empty.
DEFAULT_REFERRER_POLICY = 0;
Link copied to clipboard
The Referer header will be omitted entirely. No referrer information is sent along with requests.
NO_REFERRER = 1;
Link copied to clipboard
This is the default behavior if no policy is specified, or if the provided value is invalid. The origin, path,
and querystring of the URL are sent as a referrer when the protocol security level stays the same (HTTP→HTTP,
HTTPS→HTTPS) or improves (HTTP→HTTPS), but isn't sent to less secure destinations (HTTPS→HTTP).
NO_REFERRER_WHEN_DOWNGRADE = 2;
Link copied to clipboard
val ORIGIN_VALUE: Int = 3
Only send the origin of the document as the referrer. For example, a document at https://example.com/page.html
will send the referrer https://example.com/.
ORIGIN = 3;
Link copied to clipboard
Send the origin, path, and query string when performing a same-origin request, but only send the origin of the
document for other cases.
ORIGIN_WHEN_CROSS_ORIGIN = 4;
Link copied to clipboard
val SAME_VALUE: Int = 5
A referrer will be sent for same-site origins, but cross-origin requests will send no referrer information.
SAME = 5;
Link copied to clipboard
Only send the origin of the document as the referrer when the protocol security level stays the same
(HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).
STRICT_ORIGIN = 7;
Link copied to clipboard
Send the origin, path, and querystring when performing a same-origin request, only send the origin when the
protocol security level stays the same while performing a cross-origin request (HTTPS→HTTPS), and send no header
to any less-secure destinations (HTTPS→HTTP).
STRICT_ORIGIN_WHEN_CROSS_ORIGIN = 8;
Link copied to clipboard
Send the origin, path, and query string when performing any request, regardless of security.
UNSAFE_URL = 9;

Functions

Link copied to clipboard
Link copied to clipboard
fun getDescriptor(): Descriptors.EnumDescriptor
Link copied to clipboard
fun getDescriptorForType(): Descriptors.EnumDescriptor
Link copied to clipboard
fun getNumber(): Int
Link copied to clipboard
fun getValueDescriptor(): Descriptors.EnumValueDescriptor
Link copied to clipboard
open fun internalGetValueMap(): Internal.EnumLiteMap<Context.ReferrerPolicy>
Link copied to clipboard
open fun valueOf(desc: Descriptors.EnumValueDescriptor): Context.ReferrerPolicy

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.