New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 834083 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

ResourceTiming encodedBodySize and decodedBodySize are 0 for 304 Not Modified responses

Reported by nicjan...@gmail.com, Apr 17 2018

Issue description

UserAgent: 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:
 

Comment 1 by nicjan...@gmail.com, Apr 17 2018

Firefox 59 returns the encodedBodySize and decodedBodySize of the cached content.
Labels: Needs-Triage-M65
Cc: sindhu.chelamcherla@chromium.org
Labels: M-68 Triaged-ET FoundIn-68 Target-68
Status: Untriaged (was: Unconfirmed)
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!

Comment 4 by maxlg@chromium.org, Apr 23 2018

Components: -Blink>PerformanceAPIs Blink>PerformanceAPIs>ResourceTiming

Comment 5 by maxlg@chromium.org, Apr 23 2018

Status: Available (was: Untriaged)
Owner: tommckee@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Status: Assigned (was: Started)
I made a bit of progress on this (see crrev.com/c/1265495) but am focusing elsewhere for now.
+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`)
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