Where/how to abort previous server-side HTTP request?

Where/how to abort previous server-side HTTP request?

davidorndavidorn Posts: 1Questions: 1Answers: 0

Where and how can I access any active XHR request so I can abort it?

I have a server-side table. There are various controls on the toolbar that will cause datatables to fire a new HTTP request to the server and I want to ensure that if there is a previous request still in progress that I abort it using jqXHR.abort(). What I can't figure out is where to do this. For example, there is the preXhr.dt event that fires before a new request is made, but can I access any previously active requests in this event handler? For example, if I look at settings.jqXHR when the event fires will it be the previous request or the upcoming new request?

I've looked through all the posts and documentation I could find...


Sign In or Register to comment.