I used abort()
to cancel / abort an Ajax request, but now I want to cancel only active ajax requests. How could I do it?
Asked
Active
Viewed 282 times
1

Alexey Malev
- 6,408
- 4
- 34
- 52

Arun.DotNet
- 81
- 1
- 8
-
in my case we are using not a local variable to store ajax request. – Arun.DotNet Jun 18 '14 at 04:23
1 Answers
0
You can use a plugin such as http://plugins.jquery.com/ajaxQueue/
Also, You are best off to also incorporate a delay before sending the response so that you don't needlessly overload your server with requests. Instead of using time differences or arrays I would just keep a reference to the last ajax request created. You would abort that request each time a new one is made.