JQuery and AJAX async callback makes browser wait?
I'm developing my first pages in mvc3 using the razor view engine. When my page loads I want to asynchronously go back to the server and calculate some dynamic content. I'm using the $.ajax({..})
jquery function to post back to a controller method etc;
$(document).ready(function() {
// Code to collect relevant data...
$.ajax({
type: 'POST',
traditional: true,
url: 'MyControllerMethod',
data: object(s),
dataType: 'json',
success: function(x) {
// Code to deal with returned data...
}
});
Everything is ok apart 开发者_如何学JAVAfrom I notice the browser is displaying a busy cursor whilst my AJAX callback is occurring and doesn't return to the normal 'arrow' untilt the AJAX request has finished. Could anyone enlighten me as isn't this supposed to be an Asynchronus callback?
Regards.
To answer my own question is to point you to this SO thread,
Chrome AJAX on page-load causes “busy cursor” to remain
精彩评论