ProgressEvent.total

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

ProgressEvent.total 只读属性是一个无符号 64 位整数值,表明正在处理或者传输的数据的总大小。在 HTTP 传输的情况下,这是消息体的大小(Content-Length)并且不包含标头和其他的开销。

如果事件的 lengthComputable 属性是 false,这个值是没有意义的并且应该被忽略。

一个整数。

规范

Specification
XMLHttpRequest
# dom-progressevent-total

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
total

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见