How can I cancelar uma solicitação do Ajax
that has not yet received the answer using Jquery.
How can I cancelar uma solicitação do Ajax
that has not yet received the answer using Jquery.
You can use the abort () method, for example:
var xhr = $.ajax({
type: "POST",
url: "pagina.php",
success: function(msg){
...
}
});
//aborta o request
xhr.abort();