Can anyone tell me how to check current a working/pending ajax request in jQuery or how to stop all pending request before sending a new ajax request?
I don’t need to send multiple ajax requests.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To cancel the request you can use “abort” like the others suggest.
To check the status you can use triggers like beforeSend to know it was before sending.
You can also use global triggers which might be helpful to keep track.
All the callbacks/triggers are well documented in JQuery’s AJAX page.