Ajax, How can I distinguish between Server Unavailable and user moving away from the page
Hi there,
Using 1.4.2
We are trying to show a popup error dialog when our server in not available.
The problem comes when the user navigates away from the page, in Firefox and Chrome we get the status code 0. So the error popup appears just before the page is reloaded, users don't like this.
IE7 and 8 seem to give different behaviour ...
IE7 seems to leave the ajax request processing, and not doing anything with it when it returns.
IE8 seems to cancel the request and not process it, so this is fine.
I was wondering if there are any best practice recommendations on how to handle these deferent cases?
Cheers,
Steve