1

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

Alexey Malev
  • 6,408
  • 4
  • 34
  • 52
Arun.DotNet
  • 81
  • 1
  • 8

1 Answers1

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.