jQuery.ajax() - How to handle timeouts best?
问题 I'm wondering, what's the best way to handle timeouts with jQuery.ajax() . That's my solution at the moment: If an timeout occurs the page will be reloaded and the script gets another chance to load the data within it's given timeframe. Problem : if "get_json.php" (example below) is really not available, it will become an endless reloading-loop. Possible solution: adding a counter and cancel after $x reloads. Question 1 : How to handle the timeout error best? Question 2 : What's your