I am currently using jQuery DataTables to query a large data source, and each request takes about 2-5 seconds to run. The problem I'm running into is that the users will type much faster than that - firing off a new ajax request before the previous request is complete.
Is there some way in DataTables to make the ajax requests fire sequentially, i.e. only make a new request when the previous request is completed?
Here is my code
$(document).ready(function () {
$("#applicationListServerSide").DataTable({
mark: true,
"processing": true, // for show progress bar
"order": [[0, "desc"]],
"serverSide": true, // for process server side
"filter": true, // this is for disable filter (search box)
"orderMulti": false, // for disable multiple column at once
"searchDelay": 2000,
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
"ajax": {
"url": "/Admin/LoadData",
"type": "POST",
"datatype": "json"
}
});
});