diff --git a/files/en-us/web/api/progressevent/index.md b/files/en-us/web/api/progressevent/index.md index 393f2e531af3c85..156d2c42c1d28bd 100644 --- a/files/en-us/web/api/progressevent/index.md +++ b/files/en-us/web/api/progressevent/index.md @@ -21,11 +21,11 @@ The **`ProgressEvent`** interface represents events measuring progress of an und _Also inherits properties from its parent {{domxref("Event")}}_. - {{domxref("ProgressEvent.lengthComputable")}} {{ReadOnlyInline}} - - : A boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable. In other words, it tells if the progress is measurable or not. + - : A boolean flag indicating if the ratio between the size of the data already transmitted or processed (`loaded`), and the total size of the data (`total`), is calculable. In other words, it tells if the progress is measurable or not. - {{domxref("ProgressEvent.loaded")}} {{ReadOnlyInline}} - - : A 64-bit unsigned integer value indicating the amount of work already performed by the underlying process. The ratio of work done can be calculated by dividing `total` by the value of this property. When downloading a resource using HTTP, this only counts the body of the HTTP message, and doesn't include headers and other overhead. + - : A 64-bit unsigned integer indicating the size, in bytes, of the data already transmitted or processed. The ratio can be calculated by dividing `ProgressEvent.total` by the value of this property. When downloading a resource using HTTP, this only counts the body of the HTTP message, and doesn't include headers and other overhead. Note that for compressed requests of unknown total size, `loaded` might contain the size of the compressed, or decompressed, data, depending on the browser. As of 2024, it contains the size of the compressed data in Firefox, and the size of the uncompressed data in Chrome. - {{domxref("ProgressEvent.total")}} {{ReadOnlyInline}} - - : A 64-bit unsigned integer representing the total amount of work that the underlying process is in the progress of performing. When downloading a resource using HTTP, this is the `Content-Length` (the size of the body of the message), and doesn't include the headers and other overhead. + - : 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. ## Instance methods diff --git a/files/en-us/web/api/progressevent/loaded/index.md b/files/en-us/web/api/progressevent/loaded/index.md index a8d7d53e4620280..1457975a04cb464 100644 --- a/files/en-us/web/api/progressevent/loaded/index.md +++ b/files/en-us/web/api/progressevent/loaded/index.md @@ -8,11 +8,11 @@ browser-compat: api.ProgressEvent.loaded {{APIRef("XMLHttpRequest API")}} -The **`ProgressEvent.loaded`** read-only property is an integer -representing the amount of work already performed by the underlying process. The ratio -of work done can be calculated with the property and `ProgressEvent.total`. -When downloading a resource using HTTP, this value is specified in bytes (not bits), and only represents the part of the content -itself, not headers and other overhead. +The **`ProgressEvent.loaded`** read-only property is a 64-bit unsigned integer +indicating the size, in bytes, of the data already transmitted or processed. The ratio can be calculated by dividing `ProgressEvent.total` by the value of this property. +When downloading a resource using HTTP, this only counts the body of the HTTP message, and doesn't include headers and other overhead. + +Note that for compressed requests of unknown total size, `loaded` might contain the size of the compressed, or decompressed, data, depending on the browser. As of 2024, it contains the size of the compressed data in Firefox, and the size of the uncompressed data in Chrome. ## Value diff --git a/files/en-us/web/api/progressevent/total/index.md b/files/en-us/web/api/progressevent/total/index.md index 4aa8bf7bc15f47d..7ae4292179f40a9 100644 --- a/files/en-us/web/api/progressevent/total/index.md +++ b/files/en-us/web/api/progressevent/total/index.md @@ -8,11 +8,10 @@ browser-compat: api.ProgressEvent.total {{APIRef("XMLHttpRequest API")}} -The **`ProgressEvent.total`** read-only property is an unsigned -64-bit integer value indicating the total size of the data being processed or -transmitted. In the case of an HTTP transmission, this is the size of the body of the -message (the `Content-Length`), and does not include headers and other -overhead. +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 {{domxref("ProgressEvent.lengthComputable", "lengthComputable")}} property is `false`, this value is meaningless and should be ignored.