ajax query goes out and grabs data every 10 seconds. Server fails to respond by 10 seconds. in the mean time another same ajax query fires up. how to avoid that in JQuery?
Asked
Active
Viewed 508 times
0
-
`async:false`..[I know as a man, sometimes it's tough for me to read instructions too.](http://api.jquery.com/jQuery.ajax/) – Ohgodwhy Oct 04 '12 at 02:24
-
Or if you don't want it to block you can assign the `$.ajax()` to a variable and check the status of it to see if a request is still outstanding. – G-Nugget Oct 04 '12 at 02:35
-
[Set a timeout](http://stackoverflow.com/questions/3543683/jquery-ajax-timeout-setting). – Blazemonger Oct 04 '12 at 02:48