3 ms·
I'd say that blanket advice to retry is not terrible but not great either. First ask, is the ajax call important enough to warrent a retry at all, if it is, did
by scaryclam 10y ago
I'd say that blanket advice to retry is not terrible but not great either. First ask, is the ajax call important enough to warrent a retry at all, if it is, did the response give any useful information about why there was a failure? If yes, did it tell you that something was wrong with the request? Then don't retry as it's not going to work the second time, or third time either. Did the request timeout? Again, think about whether the request is important enough to hit a potentially already overloaded server.
Also, as a side note, any page that becomes unusable because an ajax request failed to return has some really broken design. Ajax retries are not a solution for that, go fix the design instead.