devtools network monitor counts service worker cached responses against "transferred"
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox122 fixed)
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: bkelly, Assigned: bomsy)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Reporter | ||
Comment 1•8 years ago
|
||
Updated•8 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Interesting to note that if the service worker redirects to another file, the transferred size will be 0, as expected.
eg page requests "foo.css", serviceworker fetches "bar.css" and returns the response for "bar.css", transferred size will show 0.
It seems that when the cache is hit for a different URL than the one requested initially, the onProgress (nsIProgressEventSink) callback for our NetworkResponseListener is never triggered.
Regardless of this, we have a clear flag for requests which were transferred to a serviceworker (httpActivity.fromServiceWorker
) so we should be able to handle this in DevTools and set a transferred size of 0.
Alternatively if we could APIs on the channel or the request to get the size information (header size, transferred size etc...), I feel like this could be more reliable than our current implementation?
Assignee | ||
Comment 3•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 5•1 year ago
|
||
bugherder |
Description
•