PerformanceResourceTiming Class

The timing of the fetch of a resource (https://w3c.github.io/resource-timing/#sec-performanceresourcetiming), added to the performance timeline of the global object that fetched it. The times are in milliseconds relative to the time origin of the global object, or 0 when they are not exposed (e.g. the timing allow check failed for a cross-origin resource).

public class PerformanceResourceTiming : PerformanceEntry
Inheritance
PerformanceEntry PerformanceResourceTiming

Properties

NameDescription
ConnectEndGets the time the connection was established, or 0.
ConnectStartGets the time the connection started, or 0.
ContentEncodingGets the content coding of the response (https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-contentencoding): the value of its Content-Encoding header when it is a content coding supported by the browsers, multiple for several codings, @unknown for another value, or the empty string (no content coding, or a CORS-cross-origin response).
ContentTypeGets the minimized MIME type of the response (e.g. text/css), or the empty string.
DecodedBodySizeGets the size of the body of the response, or 0 for a CORS-cross-origin response.
DeliveryTypeGets the delivery type of the resource: navigational-prefetch for the document of a navigation that used a navigational prefetch, cache for a resource whose stored response of the HTTP cache was used (validated or not, https://fetch.spec.whatwg.org/#fetch-finale), else the empty string.
DomainLookupEndGets the time the domain name lookup completed, or 0.
DomainLookupStartGets the time the domain name lookup started, or 0.
EncodedBodySizeGets the size of the body of the response, before its content codings are removed, or 0 for a CORS-cross-origin response.
FetchStartGets the time the fetch of the resource (after the redirects) started.
FinalResponseHeadersStartGets the time the headers of the final response were received, or 0.
FirstInterimResponseStartGets the time the first interim response (1xx) was received: 0, as the interim responses are not exposed by the loader.
InitiatorTypeGets the type of the initiator of the fetch (https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-initiatortype): css for the resources of the style sheets (@import, fonts, images), the local name of the element that fetched the resource (e.g. img, script, link), fetch, xmlhttprequest, or other.
NextHopProtocolGets the ALPN protocol of the connection (e.g. http/1.1), or the empty string when it is not exposed.
RedirectEndGets the time the last redirect completed, or 0.
RedirectStartGets the start time of the first redirect, or 0.
RenderBlockingStatusGets whether the resource blocked the rendering: blocking when the element that fetched it (a script, a style sheet link) was render-blocking when the fetch started, else non-blocking.
RequestStartGets the time the request was sent, or 0.
ResponseEndGets the time the response was received.
ResponseStartGets the time the response started: PerformanceResourceTiming.FirstInterimResponseStart if it is not 0, otherwise PerformanceResourceTiming.FinalResponseHeadersStart.
ResponseStatusGets the status of the response, or 0 for a network error or an opaque response.
SecureConnectionStartGets the time the TLS handshake started, or 0 for a connection that is not secure.
ServerTimingGets the metrics of the Server-Timing headers of the response (https://w3c.github.io/server-timing/#dom-performanceresourcetiming-servertiming): empty when the global object is not a secure context or when the timing allow check failed.
TransferSizeGets the size of the response: the encoded size of its body plus 300 (in place of the size of the headers), 300 for a stored response of the HTTP cache that was validated, or 0 for a stored response used without validation or when the timing allow check failed.
WorkerCacheLookupStartGets the time the service worker started to look up its caches for a router rule whose source is the cache, or 0.
WorkerFinalRouterSourceGets the source that gave the response of a request that matched a router rule (e.g. network after a cache miss), or the empty string when no rule matched.
WorkerMatchedRouterSourceGets the source of the router rule of the service worker that matched the request (e.g. network, cache), or the empty string when no rule matched.
WorkerRouterEvaluationStartGets the time the service worker started to evaluate its router rules, or 0 when the service worker has no router rule (or there is no service worker).
WorkerStartGets the time the fetch event of the request was dispatched to a service worker, or 0 when no service worker handled the request.

Gets the time the connection was established, or 0.

public double ConnectEnd { get; }

Gets the time the connection started, or 0.

public double ConnectStart { get; }

Gets the content coding of the response (https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-contentencoding): the value of its Content-Encoding header when it is a content coding supported by the browsers, multiple for several codings, @unknown for another value, or the empty string (no content coding, or a CORS-cross-origin response).

public string ContentEncoding { get; }

Gets the minimized MIME type of the response (e.g. text/css), or the empty string.

public string ContentType { get; }

Gets the size of the body of the response, or 0 for a CORS-cross-origin response.

public ulong DecodedBodySize { get; }

Gets the delivery type of the resource: navigational-prefetch for the document of a navigation that used a navigational prefetch, cache for a resource whose stored response of the HTTP cache was used (validated or not, https://fetch.spec.whatwg.org/#fetch-finale), else the empty string.

public string DeliveryType { get; }

Gets the time the domain name lookup completed, or 0.

public double DomainLookupEnd { get; }

Gets the time the domain name lookup started, or 0.

public double DomainLookupStart { get; }

Gets the size of the body of the response, before its content codings are removed, or 0 for a CORS-cross-origin response.

public ulong EncodedBodySize { get; }

Gets the time the fetch of the resource (after the redirects) started.

public double FetchStart { get; }

FinalResponseHeadersStart

PerformanceResourceTiming.cs

Gets the time the headers of the final response were received, or 0.

public double FinalResponseHeadersStart { get; }

FirstInterimResponseStart

PerformanceResourceTiming.cs

Gets the time the first interim response (1xx) was received: 0, as the interim responses are not exposed by the loader.

public double FirstInterimResponseStart { get; }

Gets the type of the initiator of the fetch (https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-initiatortype): css for the resources of the style sheets (@import, fonts, images), the local name of the element that fetched the resource (e.g. img, script, link), fetch, xmlhttprequest, or other.

public string InitiatorType { get; }

Gets the ALPN protocol of the connection (e.g. http/1.1), or the empty string when it is not exposed.

public string NextHopProtocol { get; }

Gets the time the last redirect completed, or 0.

public double RedirectEnd { get; }

Gets the start time of the first redirect, or 0.

public double RedirectStart { get; }

RenderBlockingStatus

PerformanceResourceTiming.cs

Gets whether the resource blocked the rendering: blocking when the element that fetched it (a script, a style sheet link) was render-blocking when the fetch started, else non-blocking.

public string RenderBlockingStatus { get; }

Gets the time the request was sent, or 0.

public double RequestStart { get; }

Gets the time the response was received.

public double ResponseEnd { get; }

Gets the status of the response, or 0 for a network error or an opaque response.

public ushort ResponseStatus { get; }

SecureConnectionStart

PerformanceResourceTiming.cs

Gets the time the TLS handshake started, or 0 for a connection that is not secure.

public double SecureConnectionStart { get; }

Gets the metrics of the Server-Timing headers of the response (https://w3c.github.io/server-timing/#dom-performanceresourcetiming-servertiming): empty when the global object is not a secure context or when the timing allow check failed.

public IReadOnlyList<PerformanceServerTiming> ServerTiming { get; }

Gets the size of the response: the encoded size of its body plus 300 (in place of the size of the headers), 300 for a stored response of the HTTP cache that was validated, or 0 for a stored response used without validation or when the timing allow check failed.

public ulong TransferSize { get; }

WorkerCacheLookupStart

PerformanceResourceTiming.cs

Gets the time the service worker started to look up its caches for a router rule whose source is the cache, or 0.

public double WorkerCacheLookupStart { get; }

WorkerFinalRouterSource

PerformanceResourceTiming.cs

Gets the source that gave the response of a request that matched a router rule (e.g. network after a cache miss), or the empty string when no rule matched.

public string WorkerFinalRouterSource { get; }

WorkerMatchedRouterSource

PerformanceResourceTiming.cs

Gets the source of the router rule of the service worker that matched the request (e.g. network, cache), or the empty string when no rule matched.

public string WorkerMatchedRouterSource { get; }

WorkerRouterEvaluationStart

PerformanceResourceTiming.cs

Gets the time the service worker started to evaluate its router rules, or 0 when the service worker has no router rule (or there is no service worker).

public double WorkerRouterEvaluationStart { get; }

Gets the time the fetch event of the request was dispatched to a service worker, or 0 when no service worker handled the request.

public double WorkerStart { get; }