yutakahirano / fetch-with-streams

Fetch API integrated with Streams.
66 stars 8 forks source link

"slow read" feature #22

Closed annevk closed 9 years ago

annevk commented 9 years ago

In https://www.w3.org/Bugs/Public/show_bug.cgi?id=27781 @wanderview describes a "slow read" feature. That should probably be considered in the context of this repository.

wanderview commented 9 years ago

Incidentally, I asked about this in a related blink cr. They indicated they intend to provide back-pressure to the network already. So there would probably be no difference for a "slow-mode" in blink.

yutakahirano commented 9 years ago

As a blink developer, I plan to use server's "Cache-Control: no-store" header for the switch. When storing to cache, pulling data as soon as possible makes sense.

annevk commented 9 years ago

@yutakahirano that should probably make it into the final standard as a note of sorts or perhaps even a requirement. Note it in your document for now?

yutakahirano commented 9 years ago

@annevk, do you mean something like https://github.com/yutakahirano/fetch-with-streams/pull/23?

annevk commented 9 years ago

Yeah, something like that seems fine. I would probably mention the exact set of headers.

yutakahirano commented 9 years ago

@annevk Fixed. https://github.com/yutakahirano/fetch-with-streams/commit/683e0e17b74d3485cf812ce024077c0905ce9b9b

annevk commented 9 years ago

Thanks @yutakahirano!