 <p>Maybe you need:</p> <pre><code>$.ajax({ url: "test.html", error: function(){ // will fire when timeout is reached }, success: function(){ //do something }, timeout: 3000 // sets timeout to 3 seconds }); </code></pre> <p>[READ] <a href="http://api.jquery.com/jQuery.ajax/" rel="nofollow">http://api.jquery.com/jQuery.ajax/</a></p> <p>You can specify the timeout as a property.</p>