Get transferred size of a resource using JavaScript
问题 I'm trying to measure page load performance of real website users. To make better sense of the data, I'd like to segment the data by whether or not the cache was primed. So I don't need to know before loading a resource if it was in the cache. It's enough to measure after the fact. At least in Chrome and Firefox, the dev tools "network" tab has a column which displays the transferred size. Is it possible to get this info with JavaScript? The Resource Timing API appears to have a provision for