ServerTiming values not included in appropriate resourceTiming entry
Reported by
ben.hast...@gmail.com,
May 10 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Steps to reproduce the problem: part 1 1. Open devTools to network panel 2. Navigate to https://benhastings.github.io/serverTimingDemo/ 3. click "default.css" and view the Timing tab to see the serverTiming metrics 4. In console, performance.getEntriesByType('resource')[0].serverTiming returns an empty array part 2 1. Navigate to https://server-timing.firebaseapp.com/default.css 2. in console, performance.getEntriesByType('navigation')[0].serverTiming returns an array with the two values displayed in the TIming panel What is the expected behavior? resourceTiming entries should include the serverTiming metrics with the appropriate name, duration, and description (if supplied in the header) What went wrong? In Chrome 65, the resourceTiming entries did include entries for serverTiming when supplied. At that point, they contained a name and description, but the duration was always zero regardless of what was supplied. As soon as 66 was released, I tested to see if the duration was supplied, and found the entries missing altogether. Did this work before? No Does this work in other browsers? Yes Chrome version: 66.0.3359.139 Channel: stable OS Version: OS X 10.12.6 Flash Version: I tested this in windows and macOS on 65, 66 and the latest nightly for Chromium (only on windows) I'm very interested in this capability affording the opportunity for expanded response time metrics resolution for automated performance evaluation through puppeteer and other means. I went so far as to create the firebase app just to supply serverTiming entries and the github page to expose the resource deficit. I am happy to help testing or troubleshooting further.
,
May 14 2018
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 17.10 using chrome reported version #66.0.3359.139 and latest canary #68.0.3430.0. This is a non-regression issue as it is observed from M60 old builds. Note: Using M-60 build, on testing the issue by following steps from part 1, after following step 4, no array is returned, rather it returns undefined. Hence, marking it as untriaged to get more inputs from dev team. Thanks...!!
,
May 15 2018
I might be misreading, but if M-60 refers to version 60.x, then it absolutely would return 'undefined'. The serverTiming feature wasn't announced to be available until 65. https://developers.google.com/web/updates/2018/03/nic65#server-timing
,
May 16 2018
,
May 16 2018
This is by design. Cross-origin resources return an empty array from `serverTiming` per the spec: https://w3c.github.io/server-timing/#processing-model. If you want server-timing data for those resources, add a permissive TAO header to the response of default.css, something like: Timing-Allow-Origin: *
,
May 16 2018
,
May 18 2018
Thanks for the clarification. I _thought_ I had already tried that. It was counter-intuitive that the values show up in the dev tools view and not in the console, so it seemed like something was missing.
,
May 18 2018
I agree that it's weird to see the headers in devtools but for them to not be accessible to the JS interface, but I think that devtools reflecting reality is the right thing to do. Would you have noticed a console.warn(...)? Could be something we could add. |
||||
►
Sign in to add a comment |
||||
Comment 1 by krajshree@chromium.org
, May 10 2018