ProgressEvent: total property

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.

The ProgressEvent.total read-only property is a 64-bit unsigned integer indicating the total size, in bytes, of the data being transmitted or processed.

When downloading a resource using HTTP, this value is taken from the Content-Length response header. It only counts the body of the HTTP message, and doesn't include headers and other overhead.

If the event's lengthComputable property is false, this value is meaningless and should be ignored.

Value

An integer.

Specifications

Specification
XMLHttpRequest Standard
# dom-progressevent-total

Browser compatibility

BCD tables only load in the browser

See also