Abort AJAX/Load?
Abort AJAX/Load?
vol7ron
Posts: 43Questions: 11Answers: 0
I have a toggle which changes which table is created. The table is never cached (always loaded via AJAX).
One table is significantly larger than the other and if someone toggles, then toggles back, it'll load the fastest first; or, it'll always show the largest table when there's quick toggling involved.
One way to avoid this would be to check the toggle value before the table is drawn; however another, better solution would be to reduce the browser listening for the response by calling "abort()" on the XMLHttpRequest/jqXHR object, which $.ajax() returns.
The question I have is how to access that XMLHttpRequest/jqXHR object. Does dataTables expose this through oSettings or oAPI?
One table is significantly larger than the other and if someone toggles, then toggles back, it'll load the fastest first; or, it'll always show the largest table when there's quick toggling involved.
One way to avoid this would be to check the toggle value before the table is drawn; however another, better solution would be to reduce the browser listening for the response by calling "abort()" on the XMLHttpRequest/jqXHR object, which $.ajax() returns.
The question I have is how to access that XMLHttpRequest/jqXHR object. Does dataTables expose this through oSettings or oAPI?
This discussion has been closed.