fetch-progress-indicators
fetch-progress-indicators copied to clipboard
Progress indicators/bars using Streams, Service Workers, and Fetch APIs
In your [fetch-basic example](https://github.com/AnthumChris/fetch-progress-indicators/blob/efaaaf073bc6927a803e5963a92ba9b11a585cc0/fetch-basic/supported-browser.js) you read the response then "pipe" it to a new response: ```JavaScript ... return new Response( new ReadableStream({ start(controller) { const reader = response.body.getReader(); read(); function...
Progress indicators for file uploads (specifically indicators for `Request` objects) would be a great example. At the time of writing, this doesn't seem possible yet, and the [Request docs](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request) do...
Hi there -- thanks for these examples. One improvement I suggest is to show how to forward the headers from the original request: ``` return new Response(stream, { headers: response.headers...
A SW could be used to show aggregate/total progress indicators for multiple assets that download individually as part dependencies for a PWA. Video games loading screens are good examples of...
Refactor with `TransformStream` as described by @ricea: > _The examples would be cleaner with TransformStream, but unfortunately no browser is shipping it yet. You could be really concise, something like...