SpeculativeLoadingOptions Class

The preferences of the user for the speculative loads of the speculation rules (see BrowsingContextOptions.SpeculativeLoading), e.g. a data saver mode. The specification lets the user agent decline any speculative load.

public sealed class SpeculativeLoadingOptions : IEquatable<SpeculativeLoadingOptions>
Implements

Constructors

NameDescription
SpeculativeLoadingOptions()

SpeculativeLoadingOptions()

BrowsingContextOptions.cs
public SpeculativeLoadingOptions()

No documentation is available.

Properties

NameDescription
AnonymousClientIpSupportedGets or sets whether the DocumentLoader hides the IP address of the client (e.g. with a proxy) for the requests whose Sec-Purpose header is prefetch;anonymous-client-ip. When it is false (the default), the cross-origin candidates of the rules that require it ("requires": ["anonymous-client-ip-when-cross-origin"]) are not prefetched.
DefaultGets the default preferences: the documents are prefetched and prerendered, without hiding the IP address of the client.
PrefetchEnabledGets or sets whether the candidates of the speculation rules are prefetched (https://wicg.github.io/nav-speculation/prefetch.html). When it is false, nothing is prefetched nor prerendered. The default is true.
PrerenderEnabledGets or sets whether the prerender candidates of the speculation rules are prerendered (https://wicg.github.io/nav-speculation/prerendering.html). When it is false, they are prefetched. The default is true.

AnonymousClientIpSupported

BrowsingContextOptions.cs

Gets or sets whether the DocumentLoader hides the IP address of the client (e.g. with a proxy) for the requests whose Sec-Purpose header is prefetch;anonymous-client-ip. When it is false (the default), the cross-origin candidates of the rules that require it ("requires": ["anonymous-client-ip-when-cross-origin"]) are not prefetched.

public bool AnonymousClientIpSupported { get; init; }

Property value

bool

Gets the default preferences: the documents are prefetched and prerendered, without hiding the IP address of the client.

public static SpeculativeLoadingOptions Default { get; }

Gets or sets whether the candidates of the speculation rules are prefetched (https://wicg.github.io/nav-speculation/prefetch.html). When it is false, nothing is prefetched nor prerendered. The default is true.

public bool PrefetchEnabled { get; init; }

Property value

bool

Gets or sets whether the prerender candidates of the speculation rules are prerendered (https://wicg.github.io/nav-speculation/prerendering.html). When it is false, they are prefetched. The default is true.

public bool PrerenderEnabled { get; init; }

Property value

bool

Methods

NameDescription
Equals(SpeculativeLoadingOptions?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(SpeculativeLoadingOptions?)

public bool Equals(SpeculativeLoadingOptions? other)
Parameters
other SpeculativeLoadingOptions?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(SpeculativeLoadingOptions?, SpeculativeLoadingOptions?)
operator !=(SpeculativeLoadingOptions?, SpeculativeLoadingOptions?)

operator ==(SpeculativeLoadingOptions?, SpeculativeLoadingOptions?)

public static bool operator ==(SpeculativeLoadingOptions? left, SpeculativeLoadingOptions? right)

No documentation is available.

operator !=(SpeculativeLoadingOptions?, SpeculativeLoadingOptions?)

public static bool operator !=(SpeculativeLoadingOptions? left, SpeculativeLoadingOptions? right)

No documentation is available.