NavigatorUAData Class

The identity of the user agent given by the User-Agent Client Hints (https://wicg.github.io/ua-client-hints/#navigatoruadata, navigator.userAgentData in the windows and the workers of the secure contexts): the values of BrowsingContextOptions.ClientHints, also sent in the Sec-CH-UA-* request headers.

public sealed class NavigatorUAData

Properties

NameDescription
BrandsGets the brands of the user agent and their significant versions (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-brands).
MobileGets whether the user agent prefers a mobile experience (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-mobile).
PlatformGets the platform brand (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-platform).

Gets the brands of the user agent and their significant versions (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-brands).

public IReadOnlyList<NavigatorUABrandVersion> Brands { get; }

Gets whether the user agent prefers a mobile experience (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-mobile).

public bool Mobile { get; }

Gets the platform brand (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-platform).

public string Platform { get; }

Methods

NameDescription
GetHighEntropyValues(IReadOnlyList<string>)Returns the low-entropy values and the requested high-entropy values (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-gethighentropyvalues): architecture, bitness, formFactors, fullVersionList, model, platformVersion, uaFullVersion and wow64; the other names are ignored. The document of a window that is not allowed to use the ch-ua-high-entropy-values policy-controlled feature only gets the low-entropy values. The task completes in a task of the event loop of the global object.
ToJson()Returns the low-entropy values (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-tojson).

GetHighEntropyValues(IReadOnlyList<string>)

NavigatorUAData.cs

Returns the low-entropy values and the requested high-entropy values (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-gethighentropyvalues): architecture, bitness, formFactors, fullVersionList, model, platformVersion, uaFullVersion and wow64; the other names are ignored. The document of a window that is not allowed to use the ch-ua-high-entropy-values policy-controlled feature only gets the low-entropy values. The task completes in a task of the event loop of the global object.

public Task<UADataValues> GetHighEntropyValues(IReadOnlyList<string> hints)

Returns the low-entropy values (https://wicg.github.io/ua-client-hints/#dom-navigatoruadata-tojson).

public UALowEntropyJson ToJson()