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

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...