Safari is the last browser lacking some PerformanceResourceTiming fields: https://developer.mozilla.org/en-US/docs/web/api/performanceresourcetiming (see also the following bugs: 168543 198293 185870) 'transferSize' (and 'encodedBodySize') is interesting because for example it allows distinguishing page loads with full cache vs empty cache for performance monitoring: https://nicj.net/resourcetiming-in-practice/#cached-resources Based on Nic's blog, I've been using the following code in production to iterate over critical requests and check for cache status and calculate cache hit ratio (and then be able to split performance monitoring graphs based on that): ``` if (window.PerformanceResourceTiming && 'transferSize' in PerformanceResourceTiming.prototype) { function getCacheStatus(item) { if (item.transferSize === 0) { return 'hit' } else if ( item.transferSize > 0 && item.encodedBodySize > 0 && item.transferSize < item.encodedBodySize ) { return 'revalidation' } return 'miss' } performance.getEntriesByType('resource').filter(...).map(getCacheStatus).reduce(...) } ``` But since Safari does not support it, it's not possible to have this kind of visibility about cache hit ratios for Safari users, nor compare cold cache vs warm cache RUM data.
Thnanks for filing. Apple Internal see also: rdar://43514288
*** Bug 198293 has been marked as a duplicate of this bug. ***
Created attachment 425606 [details] Patch
Comment on attachment 425606 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425606&action=review > LayoutTests/imported/w3c/web-platform-tests/resource-timing/TAO-null-opaque-origin.sub-expected.txt:6 > -PASS Test null TAO value with opaque origins > +FAIL Test null TAO value with opaque origins assert_equals: expected "PASS" but got "FAIL" This might be revealing a previous existing bug. > LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.https-expected.txt:29 > -FAIL PerformanceEntry has correct network transfer attributes (xmlhttprequest) assert_equals: encodedBodySize size expected (number) 112 but got (undefined) undefined > +FAIL PerformanceEntry has correct network transfer attributes (xmlhttprequest) assert_equals: encodedBodySize size expected 112 but got 120 I get the same failure in chrome and firefox.
Comment on attachment 425606 [details] Patch This is currently intentionally not implemented because of privacy concerns such as https://github.com/w3c/resource-timing/issues/238
I see, let's close this then.