Why did XMLHttpRequest.send() ever allow for synchronous execution

4 points by bachmann1234 ↗ HN
This is a question about the history of the api.

I was discussing async in JS with a few devs at work and I was reminded in my early web dev days (JQuery, IE6 woes, etc)

I had remembered that XMLHttpRequest had a flag 'async' which if set to false would trigger the call to be synchronous.

I remember this has a hack that would simply break your site because it would block the thread of execution.

Calling this outside of a webworker is deprecated now. But, what was the intended usecase for this back in the day? The best answer I have is that pre gmail it was very common for sites with JS to simply not have much ajax going on and blocking was just acceptable.

Is that just it? Were there other use cases in mind? Is there something i'm misremembering here? Did anyone out there use this in production systems?

thanks!

0 comments

[ 5.7 ms ] story [ 13.3 ms ] thread

No comments yet.