2

I am sending an ajax request which is called on change event of a select box.Now what I want is that when a new request is sent to server, it will abort all the previous ajax requests as otherwise there will be a lot of ajax requests executing at the same time.I just want to execute only the latest request.

All help would be highly appreciable.

user1163513
  • 4,087
  • 7
  • 24
  • 25

1 Answers1

2

Abort Ajax requests using jQuery

Just store the XMLHttpRequests in an array and abort them one by one.

Community
  • 1
  • 1
Thomas
  • 8,426
  • 1
  • 25
  • 49