8

Can I cause an xhr request to interrupt/terminate clientside? I have a number of long running requests, and I want to abandon them once they're no longer relevant.

blueberryfields
  • 45,910
  • 28
  • 89
  • 168
  • A few have pointed out a significant exception to me, so figured I'd add it as a comment here: 'jsonp' and 'xhr' requests are different, despite the usually similar convenience/wrapper functions. 'jsonp' requests, as currently implemented, cannot be interrupted/terminated clientside. – blueberryfields Nov 06 '13 at 05:42

1 Answers1

3

I believe xhr.abort() is what you're looking for.

Amadan
  • 191,408
  • 23
  • 240
  • 301