ajax request in jquery datatable makes multiple requests in server side processing rather than one at a time. The table is initialized on document.ready().
I want to abort the ajax call inside jquery datatable once the response is received.
Is there any way to stop second requests on response success?
document.ready(function() {
$("#myTable").DataTable({
"processing": true, // for show progress bar
"serverSide": true, // for process server side
"orderMulti": false, // for disable multiple column at once
"ajax": {
"url": "/home/LoadData",
"type": "Get",
"datatype": "json"
"data":{ date:'date'},// parameter on controller to filter records
},
"columns": [
{ "data": "ContactName", "name": "ContactName", "autoWidth": true },
{ "data": "CompanyName", "name": "CompanyName", "autoWidth": true },
{ "data": "Phone", "name": "Phone", "autoWidth": true },
{ "data": "Country", "name": "Country", "autoWidth": true },
{ "data": "City", "name": "City", "autoWidth": true },
{ "data": "PostalCode", "name": "PostalCode", "autoWidth": true }
]
});