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
  • 40,523
  • 27
  • 86
  • 165
  • 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
  • 179,482
  • 20
  • 216
  • 275