Re: [whatwg/fetch] Specify restriction for requests with keepalive set (#679)

@youennf I think it's valuable to have a policy in the spec, as said in the original proposal.

> I think having interoperability here is particularly good from two reasons.
>
> One is to have a unified policy. Given the leaky nature of the flag, each implementer has to make a balanced decision between developers’ convenience and users’ expectation. Having diverse policies will confuse both developers and users.
>
> The other is the difficulty to handle errors. keepalive flag is expected to be used when the page is about to unload. In such a circumstance developers are not likely to be able to detect and handle errors correctly. Having a rigid, interoperable restrictions will be developers’ benefit.

I think it's good to leave actual numbers hand-wavy. We can replace 9 in https://github.com/whatwg/fetch/issues/679#issuecomment-433827856 with something like:

When a fetch group is terminated, for each request r with keepalive set:
 - Let context be r's associated KeepaliveContext.
 - Add _r_ to _context_.
 - User agent may abort _r_ based on the number of requests in _context_ whose done flag is not set.
 - User agent may abort _r_ based on the number of requests in all KeepaliveContexts whose done flag is not set.
 - User agent may abort _r_ after certain time passed.
 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/679#issuecomment-434631744

Received on Wednesday, 31 October 2018 10:12:56 UTC