Questions tagged [resource-timing-api]

The Resource Timing API allows you to collect complete timing information related to resources in a document. It enables you to measure user latency, which is crucial to benchmark web pages.

The Resource Timing API allows you to collect complete timing information related to resources in a document. It enables you to measure user latency, which is crucial to benchmark web pages.

27 questions
6
votes
2 answers

Javascript: How to get accurate Resource Timing API entry from browser

Using the PerformanceResourceTiming, the duration value returned includes the resource scheduling time too. Here is an example: Here is the data observed using a Performance Observer: The values match with the network panel. But this value…
6
votes
0 answers

Getting Resource performance data of a specific fetch/xhr call in JavaScript Resource Timing API from a Service Worker

I'm logging all the http requests' performance data from a Service Worker on a tab by tab basis ("clientId" property of the "fetch" event). Resource Timing API provides all the high resolution timing data I need. But I can't get those data for…
6
votes
0 answers

Resource Timing API - Is there a way to retrieve the HTTP request method?

Using the resource timing api, window.performance.getEntries() returns a list of performance entries with timing information. This sort of information is shown in browser network debuggers. See here:…
6
votes
1 answer

Get an iframe DOM element given its URL

I'm using the w3c Resource Timing API. window.performance.getEntriesByType("resource"); This gives a list of resources including iframes. However, to get hold of the resources of the embedded iframes, I need to get hold of the iframe's performance…
anjanb
  • 12,999
  • 18
  • 77
  • 106
4
votes
1 answer

Get transferred size of a resource using JavaScript

I'm trying to measure page load performance of real website users. To make better sense of the data, I'd like to segment the data by whether or not the cache was primed. So I don't need to know before loading a resource if it was in the cache. …
Brian
  • 331
  • 1
  • 6
  • 19
3
votes
1 answer

PerformanceResourceTiming.responseStart and PerformanceResourceTiming.requestStart both are 0 for a status ok http request

I want to measure TTFB (Time to First Byte) for an HTTP request. I've hosted a 0KB pdf file on an amazon S3 server, and I'm using the fetch api to get it. Here's my code: let url =…
3
votes
1 answer

Why do PerformanceResourceTiming interface values differ from browser values?

I've written a script that runs on a domain and fetches images from various other domains (3rd party resources). I'm trying to use window.performance.getEntriesByType('resource') to get a general health check of things. It seems, since these…
3
votes
1 answer

Why can not I access network timing data without Timing-Allow-Origin in resource timing API

I am reading this post about resource timing API and I can not understand the reason behind the following restriction: Resources fetched from a third-party must provide an additional HTTP header (Timing-Allow-Origin: *) to allow the site to…
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
2
votes
0 answers

What is "CommitLoad" event in performance timeline tracing?

I'm trying find out what is CommitLoad event. I found it during recording all trace events and searching for events related with main html network request times: { // 1 pid: 37054, tid: 775, ts: 29055807727, ph: "I", cat:…
Everettss
  • 15,475
  • 9
  • 72
  • 98
2
votes
2 answers

Which Version of Chrome supports window.performance.clearResourceTimings and what is the alternative

Since when does chrome support window.performance.clearResourceTimings and what is the alternative if it is not available? I can't find any details in the release notes or MDN. There is a clearMarks function but it does not reset the list of items.
Elmar Weber
  • 2,683
  • 28
  • 28
2
votes
1 answer

How to get the Size of a webpage resource like javascript, css, image, etc

The w3c resource Timing API gives a mechanism to find the timing details of loading a resource like .js, .css, .gif, font, etc. However, current implementations haven't yet implemented returning the size of the resource…
anjanb
  • 12,999
  • 18
  • 77
  • 106
1
vote
1 answer

Javascript performance API PerformanceResourceTiming returns 0 for most of properties

Currently I'm working on Angular application that let's user measure loading time of specific page. I'm loading that page from my app as an iframe in the background and want to measure specific timestamps of loading that iframe using javascript…
1
vote
0 answers

High Web Unload time -does it affect Time To First Byte metric?

We have a Production monitoring system which gives stats on Web Navigation and Resource Timings as indicated by W3C standards. A sample reference for stats is given…
1
vote
1 answer

Parallel downloading of JS files in HTML

I have an HTML file which looks like this ... 1.js contains just one line…
1
vote
1 answer

How to measure requests (XHR) duration in AngularJS?

I'm trying to implement an interceptor for AngularJS (1.5.x), which can measure each api calls and send the duration of each of them to the Google Analytics. I've started with a dummy implementation of this, using just new…
1
2