lbryio / lbry-desktop

A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.
https://lbry.tech
MIT License
3.56k stars 414 forks source link

Only pass time to first byte analytics if data is not cached #6188

Open tzarebczan opened 3 years ago

tzarebczan commented 3 years ago

Right now we pass it for all views, including those that come from memory/disk.

DispatchCommit commented 3 years ago

🤔 This seems interesting to detect...

https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/transferSize

If the resource is fetched from a local cache, or if it is a cross-origin resource, this property returns zero.