XMLHttpRequest: Learn why Asynchronous is Best

Wednesday, August 3rd, 2011 | Business | by

Ran across an article on MSDN (I know, right?) about the problems with synchronous XMLHttpRequests, and how it actually causes 8.4% of all hangs in IE9.

Synchronous is easier to work with, as it flows just like a user would expect.  Asynchronous is slightly tougher to use, as it requires handling the response out of sync with the rest of the page’s code.

You can find some helpful information about the problem, along with some examples, and fixes at Why You Should Use XMLHttpRequest Asynchronously.

An excerpt from the article:

8.4% of all hangs in IE9 in the past month are caused by XMLHttpRequest objects blocking the UI thread with a synchronous request. That’s a huge number! With some manageable code changes, these hangs can be avoided, and developers can give their users a better experience across their websites. We’ll get into what’s happening here, what you can do about it, and we’ll give a little demonstration to see firsthand what can happen when a synchronous request hangs the browser.

Related Posts

Tags: , , , ,

No comments yet.

Leave a comment

*


Please share, it makes me happy:

Subscribe to Email Alerts

Follow Me

Follow seangw on twitter

Archives

Categories

prestashop theme

virtuemart template