Re: [XHR2] timeout

Are any user agents other than IE8+ currently implementing or have
implemented XHR2 timeout?

I have a couple of things I wanted to question, which may or may not result
in clarification in the spec.

   1. The spec says the timeout should fire after the specified number of
   milliseconds has elapsed since the start of the request.  I presume this
   means literally that, with no bearing on whether or not data is coming over
   the wire?
   2. Given we have progress events, we can determine that data is coming
   over the wire and react accordingly (though in an ugly fashion,
   semantically).  E.g., the author can disable the timeout or increase the
   timeout.  Is that use case possible?  In other words, should setting the
   timeout value during an active request reset the timer?  Or should the
   timer always be basing its elapsed time on the start time of the request +
   the specified timeout value (an absolute point in the future)?  I
   understand the language in the spec is saying the latter, but perhaps could
   use emphasis that the timeout value can be changed mid-request.
    Furthermore, if the timeout value is set to a value > 0 but less than the
   original value, and the elapsed time is past the (start_time + timeout), do
   we fire the timeout or do we effectively disable it?
   3. Since network stacks typically operate w/ timeouts based on data
   coming over the wire, what about a different timeout attribute that fires a
   timeout event when data has stalled, e.g., dataTimeout?  I think this type
   of timeout would be more desirable by authors to have control over for
   async requests, since today it's kludgey to try and simulate that with
   timers/progress events + abort().  Whereas with the overall request
   timeout, library authors already simulate that easily with timers + abort()
   in the async context.  For sync requests in worker contexts, I can see a
   dataTimeout as being heavily desired over a simple request timeout.


Received on Wednesday, 21 December 2011 15:26:24 UTC