There is a functionality on my site which sends different ajax requests to the server. The duration of every request may be different (1 second – 3 minutes). There is a need to abort the request if it takes more then 30 seconds. How to do it?
Share
You may set the timeout in your $.ajax method, as described in http://api.jquery.com/jQuery.ajax/
For example, following request would timeout in 1 min
You may write complete callback to check whether timeout happend