Streaming a client-side generated response as a download, without service worker
问题 Suppose I have a large file I generate client-side that I want to allow the user to save to their hard drive. The usual method would be to create a Blob, and then create an object URL for it: const blob = new Blob([chunks], {type: 'application/example'}); linkEl.href = URL.createObjectUrl(blob); This works, but isn't very efficient as it can quickly exhaust all available memory, since the resulting file has to remain in memory. A better method would enable streaming. Something like this: