From 87d974f5a37297d2b95ded0cd7a4301dacb3d3d8 Mon Sep 17 00:00:00 2001 From: Ragul <67683723+ragul1697@users.noreply.github.com> Date: Sat, 26 Oct 2024 03:32:51 +0530 Subject: [PATCH] Fix: ProgressEvent ratio (#36499) * Update: Progress event ratio * Update: Progress event ratio --- files/en-us/web/api/filereader/progress_event/index.md | 2 +- files/en-us/web/api/progressevent/loaded/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/filereader/progress_event/index.md b/files/en-us/web/api/filereader/progress_event/index.md index 3d2ff0acf649599..329be43867d6613 100644 --- a/files/en-us/web/api/filereader/progress_event/index.md +++ b/files/en-us/web/api/filereader/progress_event/index.md @@ -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. diff --git a/files/en-us/web/api/progressevent/loaded/index.md b/files/en-us/web/api/progressevent/loaded/index.md index 66f2bbe10a855dc..14b3cb763466a6c 100644 --- a/files/en-us/web/api/progressevent/loaded/index.md +++ b/files/en-us/web/api/progressevent/loaded/index.md @@ -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.