Hello kartik,
Just use ajax.abort().
For example you could abort any pending ajax request before sending another one like this
//check for existing ajax request
if(ajax){
ajax.abort();
}
//then you make another ajax request
$.ajax(
//your code here
);
Hope this is helpful!!
Thank You!!