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
PerformanceEntryPerformanceResourceTiming
Properties
| Name | Description |
|---|---|
| ConnectEnd | Gets the time the connection was established, or 0. |
| ConnectStart | Gets the time the connection started, or 0. |
| ContentEncoding | 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). |
| ContentType | Gets the minimized MIME type of the response (e.g. text/css), or the empty string. |
| DecodedBodySize | Gets the size of the body of the response, or 0 for a CORS-cross-origin response. |
| DeliveryType | 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. |
| DomainLookupEnd | Gets the time the domain name lookup completed, or 0. |
| DomainLookupStart | Gets the time the domain name lookup started, or 0. |
| EncodedBodySize | Gets the size of the body of the response, before its content codings are removed, or 0 for a CORS-cross-origin response. |
| FetchStart | Gets the time the fetch of the resource (after the redirects) started. |
| FinalResponseHeadersStart | Gets the time the headers of the final response were received, or 0. |
| FirstInterimResponseStart | Gets the time the first interim response (1xx, e.g. 103 Early Hints) was received, or 0 when the loader reported none (see DocumentRequest.ReportInterimResponse). |
| InitiatorType | 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. |
| InitiatorUrl | Gets the URL of the script or of the style sheet that started the fetch (https://github.com/w3c/resource-timing/issues/263): the URL of the style sheet for the resources of a style sheet (its @import rules, its fonts and its images), else the URL of the script to which the task that started the fetch is attributed (the script that runs, or the script that scheduled the timer, the task, the callback or the asynchronous operation that runs, the URL of the document for an inline script), else the URL of the document or of the worker. It is the empty string for a navigation. |
| NextHopProtocol | Gets the ALPN protocol of the connection (e.g. http/1.1), or the empty string when it is not exposed. |
| RedirectEnd | Gets the time the last redirect completed, or 0. |
| RedirectStart | Gets the start time of the first redirect, or 0. |
| RenderBlockingStatus | 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. |
| RequestStart | Gets the time the request was sent, or 0. |
| ResponseEnd | Gets the time the response was received. |
| ResponseStart | Gets the time the response started: PerformanceResourceTiming.FirstInterimResponseStart if it is not 0, otherwise PerformanceResourceTiming.FinalResponseHeadersStart. |
| ResponseStatus | Gets the status of the response, or 0 for a network error or an opaque response. |
| SecureConnectionStart | Gets the time the TLS handshake started, or 0 for a connection that is not secure. |
| ServerTiming | 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. |
| TransferSize | 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. |
| WorkerCacheLookupStart | Gets the time the service worker started to look up its caches for a router rule whose source is the cache, or 0. |
| WorkerFinalRouterSource | 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. |
| WorkerMatchedRouterSource | 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. |
| WorkerRouterEvaluationStart | 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). |
| WorkerStart | Gets the time the fetch event of the request was dispatched to a service worker, or 0 when no service worker handled the request. |
ConnectEnd
PerformanceResourceTiming.csGets the time the connection was established, or 0.
public double ConnectEnd { get; }Property value
See also
ConnectStart
PerformanceResourceTiming.csGets the time the connection started, or 0.
public double ConnectStart { get; }Property value
See also
ContentEncoding
PerformanceResourceTiming.csGets 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; }ContentType
PerformanceResourceTiming.csGets the minimized MIME type of the response (e.g. text/css), or the empty string.
public string ContentType { get; }Property value
See also
DecodedBodySize
PerformanceResourceTiming.csGets the size of the body of the response, or 0 for a CORS-cross-origin response.
public ulong DecodedBodySize { get; }DeliveryType
PerformanceResourceTiming.csGets 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; }Property value
See also
DomainLookupEnd
PerformanceResourceTiming.csGets the time the domain name lookup completed, or 0.
public double DomainLookupEnd { get; }DomainLookupStart
PerformanceResourceTiming.csGets the time the domain name lookup started, or 0.
public double DomainLookupStart { get; }EncodedBodySize
PerformanceResourceTiming.csGets 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; }FetchStart
PerformanceResourceTiming.csGets the time the fetch of the resource (after the redirects) started.
public double FetchStart { get; }Property value
See also
FinalResponseHeadersStart
PerformanceResourceTiming.csGets the time the headers of the final response were received, or 0.
public double FinalResponseHeadersStart { get; }FirstInterimResponseStart
PerformanceResourceTiming.csGets the time the first interim response (1xx, e.g. 103 Early Hints) was received, or 0 when the loader reported none (see DocumentRequest.ReportInterimResponse).
public double FirstInterimResponseStart { get; }InitiatorType
PerformanceResourceTiming.csGets 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; }Property value
See also
InitiatorUrl
PerformanceResourceTiming.cs- Experimental (WEBPLATEXP0026)
Gets the URL of the script or of the style sheet that started the fetch (https://github.com/w3c/resource-timing/issues/263): the URL of the style sheet for the resources of a style sheet (its @import rules, its fonts and its images), else the URL of the script to which the task that started the fetch is attributed (the script that runs, or the script that scheduled the timer, the task, the callback or the asynchronous operation that runs, the URL of the document for an inline script), else the URL of the document or of the worker. It is the empty string for a navigation.
[Experimental("WEBPLATEXP0026", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public string InitiatorUrl { get; init; }NextHopProtocol
PerformanceResourceTiming.csGets the ALPN protocol of the connection (e.g. http/1.1), or the empty string when it is not exposed.
public string NextHopProtocol { get; }RedirectEnd
PerformanceResourceTiming.csGets the time the last redirect completed, or 0.
public double RedirectEnd { get; }Property value
See also
RedirectStart
PerformanceResourceTiming.csGets the start time of the first redirect, or 0.
public double RedirectStart { get; }Property value
See also
RenderBlockingStatus
PerformanceResourceTiming.csGets 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; }RequestStart
PerformanceResourceTiming.csResponseEnd
PerformanceResourceTiming.csResponseStart
PerformanceResourceTiming.csGets the time the response started: PerformanceResourceTiming.FirstInterimResponseStart if it is not 0, otherwise PerformanceResourceTiming.FinalResponseHeadersStart.
public double ResponseStart { get; }Property value
See also
ResponseStatus
PerformanceResourceTiming.csGets the status of the response, or 0 for a network error or an opaque response.
public ushort ResponseStatus { get; }SecureConnectionStart
PerformanceResourceTiming.csGets the time the TLS handshake started, or 0 for a connection that is not secure.
public double SecureConnectionStart { get; }ServerTiming
PerformanceResourceTiming.csGets 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; }TransferSize
PerformanceResourceTiming.csGets 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; }Property value
See also
WorkerCacheLookupStart
PerformanceResourceTiming.csGets 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.csGets 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.csGets 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.csGets 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; }WorkerStart
PerformanceResourceTiming.csGets 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; }