NetworkErrorLoggingCache Class
The Network Error Logging policies of the origins (https://w3c.github.io/network-error-logging/), set by the NEL header of their responses: the requests to an origin that has a policy (or to its subdomains, for a policy with include_subdomains) generate network-error reports, sampled by the success_fraction and failure_fraction of the policy, which are sent to the endpoint named by its report_to member (an endpoint of the Reporting-Endpoints header, or a group of the Report-To header, of the response that set the policy). See BrowsingContextOptions.NetworkErrorLogging.
public sealed class NetworkErrorLoggingCacheRemarks
A report is generated for each response of the network (the redirects and the 304 responses of a revalidation included, not the responses of the HTTP cache) and for each request that fails: its type is ok, http.error (a 4xx or 5xx status), dns.name_not_resolved or tcp.failed (the HttpRequestError of a HttpRequestException thrown by the DocumentLoader), or unknown. The reports are not visible to the ReportingObserver objects, and the requests that send them do not generate reports.
The cache is thread-safe: it can be shared by several browsing contexts.
Constructors
| Name | Description |
|---|---|
| NetworkErrorLoggingCache() |
NetworkErrorLoggingCache()
NetworkErrorLogging.cspublic NetworkErrorLoggingCache()No documentation is available.
Methods
| Name | Description |
|---|---|
| Clear() | Removes the policies of every origin. |
| GetPolicyCount(DateTimeOffset) | Gets the number of policies that are not expired. |
Clear()
NetworkErrorLogging.csRemoves the policies of every origin.
public void Clear()GetPolicyCount(DateTimeOffset)
NetworkErrorLogging.csGets the number of policies that are not expired.
public int GetPolicyCount(DateTimeOffset now)