Skip to content

Commit

Permalink
Fix: ProgressEvent ratio (mdn#36499)
Browse files Browse the repository at this point in the history
* Update: Progress event ratio

* Update: Progress event ratio
  • Loading branch information
ragul1697 authored Oct 25, 2024
1 parent c420b9b commit 87d974f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/api/filereader/progress_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _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.
- {{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 value indicating the amount of work already performed by the underlying process. The ratio of work done can be calculated by dividing the value of this property by `total`. When downloading a resource using HTTP, this only counts the body of the HTTP message, and doesn't include headers and other overhead.
- {{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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/progressevent/loaded/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ browser-compat: api.ProgressEvent.loaded
{{APIRef("XMLHttpRequest API")}}{{AvailableInWorkers}}

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.
indicating the size, in bytes, of the data already transmitted or processed. The ratio can be calculated by dividing the value of this property by `ProgressEvent.total`.
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.
Expand Down

0 comments on commit 87d974f

Please sign in to comment.