Bug 227393

Summary: ResourceTiming `transferSize` implementation should expose revalidation state
Product: WebKit Reporter: Yoav Weiss <yoav>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Yoav Weiss 2021-06-25 03:04:56 PDT
As discussed on the WebPerf WG call [1], the experimental `transferSize` implementation [2] should align to the spec [3] and well as the outstanding relevant PR [4], and expose:
* The encodedBodySize + 300 for resources that were fetched over the network
* 0 for resources that were fetched from the cache
* 300 for resources that were successfully revalidated over the network, and their body was then delivered from cache.

[1] https://docs.google.com/document/d/10dz_7QM5XCNsGeI63R864lF9gFqlqQD37B4q8Q46LMM/edit?pli=1#heading=h.gkilfdieaqp
[2] https://github.com/WebKit/WebKit/blob/b5cd1015460639460f55ae4b05bc90ff4ea5125e/Source/WebCore/page/PerformanceResourceTiming.cpp#L246
[3] https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-transfersize
[4] https://github.com/w3c/resource-timing/pull/272
Comment 1 Radar WebKit Bug Importer 2021-07-02 03:05:18 PDT
<rdar://problem/80074642>