Fetch Streams are Great, But Not for Measuring Upload/Download Progress

Back
This is an AI-generated summary. for details.
Fetch Streams are Great, But Not for Measuring Upload/Download Progress

Jake Archibald discusses the limitations of using the Fetch API's streaming capabilities to track upload and download progress. While streaming allows for chunked data processing, relying on it for progress monitoring can lead to inaccurate results and potential misimplementations. For instance, measuring download progress using Content-Length can be misleading when compression is involved, as the decoded size may differ from the encoded size. Similarly, with upload streams, determining progress is unreliable because the Fetch API measures when data is taken from the stream, not when it's actually sent over the network. Jake emphasizes that while Fetch streams are valuable for efficient data handling, they are not suitable for precise progress tracking.

Read the full article