I hope to write a front-end monitoring utility to record server response time and content downloading time for API calls.
Using XHR, readyState
3 (LOADING
) indicating downloading begins.
How can I get similar information from fetch()
API?
I hope to write a front-end monitoring utility to record server response time and content downloading time for API calls.
Using XHR, readyState
3 (LOADING
) indicating downloading begins.
How can I get similar information from fetch()
API?
You can use PerformanceObserver()
Count console.log objects and Performance
. You can also utilize EventSource
see How to read and echo file size of uploaded file being written at server in real time without blocking at both server and client?