How can I use deflated/gzipped content with an XHR onProgress function?

前端 未结 8 2384
醉酒成梦
醉酒成梦 2020-12-08 00:11

I\'ve seen a bunch of similar questions to this get asked before, but I haven\'t found one that describes my current problem exactly, so here goes:

I have a page whi

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 00:58

    We have created a library that estimates the progress and always sets lengthComputable to true.

    Chrome 64 still has this issue (see Bug)

    It is a javascript shim that you can include in your page which fixes this issue and you can use the standard new XMLHTTPRequest() normally.

    The javascript library can be found here:

    https://github.com/AirConsole/xmlhttprequest-length-computable

提交回复
热议问题