I need a way to set some kind of timeout function globally with $.ajaxSetup that will allow my Phonegap application to keep retrying an ajax GET or POST every time there is a ti
Found a solution to make all AJAX calls work with a retry timeout.
$(document).ajaxError(function (e, xhr, options) { if(xhr.status == 0){ setTimeout(function(){ console.log('timeout, retry'); $.ajax(options); }, 5000); } });