whatwg/xhr

Should sync XHR fire a progress event?

ricea opened this issue · 3 comments

ricea commented

https://xhr.spec.whatwg.org/commit-snapshots/02600c40359bd70229606c33b3e2ca27308ffb04/#ref-for-concept-event-fire-progress⑦

Fire a progress event named progress with transmitted and length.

This appears to imply that the progress event is fired even when the synchronous flag is set.

I have been investigating Chromium issue https://crbug.com/402986 which is about Chromium not firing this event for sync XHR. I checked in Chrome, Firefox, Safari, IE and Edge, and only Firefox ever fires a progress event for sync XHR, and even then only about 50% of the time.

I would prefer to change the standard to not fire a progress event for sync XHR, to match the majority behaviour.

This would mean updating https://xhr.spec.whatwg.org/#handle-response-end-of-body only, right? I'd be okay making it conditional there.

ricea commented

Yes. It should be a tiny change. I can write a test if it helps.

Yeah it would, thanks.