I use PerformanceObserver to measure the timing of HTTP calls. However, I noticed that PerformanceObserver is unable to measure some PerformanceResourceTiming attributes such as domainLookupStart, domainLookupEnd, redirectStart, redirectEnd, secureConnectionStart. Those attributes are always returned 0 although I can see DNS lookup, SSL, initial connection have valid values in Chrome Network Timing Window. As far as I searched, I could not see a similar issue is reported. So, I do not know this is a known issue.
To illustrate the problem, I made this codepen. Just make a request and check console.logs. You will see the attributes that I mentioned above would be 0 although those are not actually 0 in chrome debug tool Timing Window. Also, make sure you disable the cache before making the request.
This is not the only problem. When a URL is redirected, the measurements would be quite incorrect. Unfortunately, I could not find a public sample redirected URL to represent the issue. If it is required, I will look further.
Lastly, I also asked this question on stackoverflow. However, I could not get any response so far.
Thank you.
Note: This is tested on Chrome 74.0.3729.131 and Chrome Canary Version 76.0.3795.0 (Official Build) canary (64-bit).
Apologies for the invalid question. I did read the documentation. It looks like I have to add Timing-Allow-Origin header to the requests. Hence, I close this ticket.
I use PerformanceObserver to measure the timing of HTTP calls. However, I noticed that PerformanceObserver is unable to measure some PerformanceResourceTiming attributes such as domainLookupStart, domainLookupEnd, redirectStart, redirectEnd, secureConnectionStart. Those attributes are always returned 0 although I can see DNS lookup, SSL, initial connection have valid values in Chrome Network Timing Window. As far as I searched, I could not see a similar issue is reported. So, I do not know this is a known issue.
To illustrate the problem, I made this codepen. Just make a request and check console.logs. You will see the attributes that I mentioned above would be 0 although those are not actually 0 in chrome debug tool Timing Window. Also, make sure you disable the cache before making the request.
This is not the only problem. When a URL is redirected, the measurements would be quite incorrect. Unfortunately, I could not find a public sample redirected URL to represent the issue. If it is required, I will look further.
Lastly, I also asked this question on stackoverflow. However, I could not get any response so far.
Thank you.
Note: This is tested on Chrome 74.0.3729.131 and Chrome Canary Version 76.0.3795.0 (Official Build) canary (64-bit).