Getting Rid of Synchronous XHRs

Heads up! The XMLHttpRequest2 spec was recently changed to prohibit sending a synchronous request when xhrresponseType is set
The idea behind the change is to help mitigate further usage of synchronous xhrs wherever possible

For example the following code will now throw an INVALID_ACCESS_ERR in developer channel builds of Chrome and FF:

var xhr = new XMLHttpRequest();
xhrresponseType = ‘arraybuffer’;
xhropen(‘GET’ ‘/’ false); // sync request
xhrsend();
See WebKit Bug Buzilla Bug

Note: the ability to parse HTML has also been added to …..




View Post
0saves