Monday, 26 December 2016

javascript - Can I / how do I explicitly terminate a long running xhr request?




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.


Answer



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


No comments:

Post a Comment