I am working on a video streaming application in javascript, i want to tell user how much mbs of data user have consumed/used or how much data has been transferred from server to your browser.
I can see the data transfer size in network tab of browser but i don't know the right way to get the actual transfer size of data from server to browser pragmatically on client side.
I have found a browser performance API that is PerformanceResourceTiming API. This api provide data transfer size attribute but it is not working in safari browser.
What is the right way to do find actual data size transferred and which works on every browser/environment
fetch
, you have full access to transfer info via Fetch API. – Imprisonment