Is there a way to abort all Ajax requests globally without a handle on the request object?
The reason I ask is that we have quite a complex application where we are running a number of different Ajax requests in the background by using setTimeOut(). If the user clicks a certain button we need to halt all ongoing requests.
You need to call
abort()method:After that you can abort the request:
This way you need to create a variable for your ajax request and then you can use the
abortmethod on that to abort the request any time.Also have a look at: