PerformanceObserver does not observe navigator.sendBeacon requests |
|||||||||
Issue description
Version: 56.0.2919.0
OS: MacOSX
PerformanceObserver should get callbacks for navigator.sendBeacon() requests when `entryTypes: 'resource'` is used.
=== REPRO ===
Expected: that the following logs an entry for the request (it does not):
const observer = new PerformanceObserver(list => {
console.log(list.getEntries());
}).observe({entryTypes: ['resource']});
navigator.sendBeacon('https://posttestserver.com/');
Actual: no entry is observed.
,
Nov 14 2016
,
Apr 13 2017
Supporting Resource Timing with Performance Observer is "Level 3" API - which I believe is still in "getting the spec ready" stage. (Ilya - is that right?) So this is currently working as intended - from implementation POV.
,
Apr 13 2017
Integration with PerformanceObserver *is* part of L2: https://www.w3.org/TR/resource-timing-2/#processing-model > step 20: Queue the PerformanceResourceTiming object. AFAIK, everything but sendBeacon works.. so that is an implementation bug on our side. That said, I believe Tokyo team is working towards rebasing our current implementation on top of fetch (once "keepalive" support is implemented), so this should—hopefully—be resolved as part of that.
,
Apr 14 2017
tyoshino - could you confirm or triage?
,
Apr 18 2017
This is because sendBeacon doesn't go through ResourceFetcher. Need to manually invoke FrameFetchContext::AddResourceTiming(). Adding yhirano@ as he's going to re-design PingLoader.
,
Jun 1 2017
In the effort of making sendBeacon nice, we'll throw PingLoader away. Once everything's aligned with the other loading paths, we could easily fix this. For now, unassigning myself until the rearchitecture is done.
,
Oct 3 2017
Filing this under ResourceTiming, let me know if that doesn't seem correct.
,
Oct 6 2017
It's fixed now as SendBeacon is using ResourceFetcher. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by igrigo...@google.com
, Nov 14 2016