Home Abort Ajax requests using jQuery
Reply: 0

Abort Ajax requests using jQuery

user7012 Published in September 19, 2018, 3:17 am

Using jQuery, how can I cancel/abort an Ajax request that I have not yet received the response from?

share|improve this question
  • 2
    Maybe I've misunderstood the question, but couldn't you simply use $.ajaxStop? – Luke Madhanga Sep 13 '13 at 11:47
  • 15
    @LukeMadhanga; I think ajaxStop only detects when all AJAX requests are complete, it doesn't stop a request. In my experience, you would use it like this: $(document).ajaxStop(function(){alert("All done")}). Using .abort() is the best option. – TheCarver Dec 9 '13 at 11:35

18 Answers 18

active oldest votes
up vote 1605 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.425188 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO