var ajax_request = ""; function go_ajax(){ if(typeof ajax_request !== 'undefined'){ ajax_request.abort(); } ajax_request = $.ajax({ type: 'post', url: '/УРЛ_САЙТА', data: {par: params_}, success: function(data) { //действия по success } });
}
How to cancel the request for the server .... ajax_request.abort () stops "listening" for the client, the server does not complete the previous task yet, remains busy