我希望编写一个前端监控实用程序来记录服务器响应时间和内容下载时间的API调用。
使用XHR,readyState 3 (LOADING)表示开始下载。
我如何从fetch() API中获得类似的信息?
发布于 2017-10-26 13:37:15
您可以使用PerformanceObserver() Count console.log objects和Performance。您还可以利用EventSource (参见How to read and echo file size of uploaded file being written at server in real time without blocking at both server and client? )
https://stackoverflow.com/questions/46955675
复制相似问题