Kill Ajax request between

I am running an Ajax request using jQuery. During the process, I show the loaded text to the user until he reaches the success / errorhandler function. Is there any way to abort the request in the middle. So this does not apply to the success / errorHandler variable. One way I can think of is to use a global variable. There is a better method.

thanks

+3
source share
2 answers

Perhaps this is the beginning?

$. ajax () returns the generated XMLHttpRequest. In most cases, you do not need this object for direct management, but it is available if you need to cancel the request manually .

http://docs.jquery.com/Ajax/jQuery.ajax#options

+4

, abort() .

, , . .

0

Source: https://habr.com/ru/post/1702366/


All Articles