ResourceTiming encodedBodySize and decodedBodySize are 0 for 304 Not Modified responses
Reported by
nicjan...@gmail.com,
Apr 17 2018
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 Steps to reproduce the problem: 1. Initiate a conditional get for a resource that returns a 304 Not Modified 2. Examine the ResourceTiming entry for this resource Example test case is at: http://dev.nicj.net/resourcetiming/304.html 1. Load http://dev.nicj.net/resourcetiming/304.html 2. Soft-refresh 3. See that the page reports the encodedBodySize and decodedBodySize attributes are 0 What is the expected behavior? The encodedBodySize and decodedBodySize attributes should "... reports the size of the previously retrieved payload body" per the ResourceTiming2 spec: https://www.w3.org/TR/resource-timing-2/#dom-performanceresourcetiming-transfersize What went wrong? The encodedBodySize and decodedBodySize attributes are 0. Did this work before? No Does this work in other browsers? Yes Chrome version: 65.0.3325.181 Channel: stable OS Version: 10.0 Flash Version:
,
Apr 18 2018
,
Apr 18 2018
Able to reproduce this issue on reported version 65.0.3325.181, on latest stable 66.0.3359.117 and on latest canary 68.0.3398.0 using Windows 10, Ubuntu 14.04 and Mac 10.13.3 This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged. Thanks!
,
Apr 23 2018
,
Apr 23 2018
,
Jul 25
,
Jul 30
,
Oct 5
I made a bit of progress on this (see crrev.com/c/1265495) but am focusing elsewhere for now.
,
Nov 14
+1 on this. I am on chrome Version 70.0.3538.77 (Official Build) (64-bit) 1) 304 responses return 0 for encodedBodySize/decodedBodySize 2) in memory / disk cached responses (with cache-control: public, max-age: ...) return 0 as well, 3) files loaded from other domains also return 0 for encoded / decoded body size. We use another domain to serve js files from our cdn and those responses are always 0 even with cache disabled in dev-tools. In general, according to the spec, we should see the same info as the chrome devtools network panel after doing performance.getEntriesByType(`resource`)
,
Nov 14
Also it's just not encodedBodySize and decodedBodySize, but also transferSize is 0 too. Because of this, it's hard to rely on ResourceTiming api to capture user time network bloat. Firefox seems to have similar issues too. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by nicjan...@gmail.com
, Apr 17 2018