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
| Name | Description |
|---|---|
| SpeculativeLoadingOptions() |
SpeculativeLoadingOptions()
BrowsingContextOptions.cspublic SpeculativeLoadingOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| AnonymousClientIpSupported | 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. |
| Default | Gets the default preferences: the documents are prefetched and prerendered, without hiding the IP address of the client. |
| PrefetchEnabled | 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. |
| PrerenderEnabled | 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. |
AnonymousClientIpSupported
BrowsingContextOptions.csGets 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
Default
BrowsingContextOptions.csGets the default preferences: the documents are prefetched and prerendered, without hiding the IP address of the client.
public static SpeculativeLoadingOptions Default { get; }Property value
PrefetchEnabled
BrowsingContextOptions.csPrerenderEnabled
BrowsingContextOptions.csMethods
| Name | Description |
|---|---|
| Equals(SpeculativeLoadingOptions?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Equals overloads
Equals(SpeculativeLoadingOptions?)
public bool Equals(SpeculativeLoadingOptions? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| 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.