jQuery .ajax nightmare
jQuery .ajax nightmare
Hi all, speaking from the tongue of the inexperience.
Environment: ASP.NET MVC
Method: Access list of objects thru controller (returned JSON format).
I've got 5000 records and a custom grid made in jQuery.
Using .ajax method of jQuery works fine for me, but when my paging is done and do the testing of it. It seems to me that everything stops at exactly the tenth page (size 50 items per page). Here is my ajax calling scripts in jQuery:
-
var execute = function() {
$.ajax({
url: url,
global: false,
type: "GET",
cache: false,
timeout: 50000,
contentType: "application/json; charset=utf-8",
data: { idx: parameters.index, size: parameters.size, sort: parameters.sort },
dataType: "json",
beforeSend: function(xhr) {
before(xhr);
},
success: function(msg) {
completed(msg);
msg = null;
},
error: function(xhr) {
failed(xhr);
}
});
};
Means that I need to wait for another long minutes in able for the grid to work again. I do not have any ideas where jQuery saving all the items since my cache property is set to false. I only know that after the tenth request / page of the grid everything stops there...
Thanks in advance.