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.

1
  • 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. Commented Nov 6, 2013 at 5:42

1 Answer 1

3

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.