Any way to prevent Safari and Chrome from showing loading animations while XHR is active?

I use the XMLHTTPRequest binding to receive asynchronous events from the server. XHR opens the server URI and then freezes until an event occurs or a timeout occurs, in any case, JS immediately starts a new XHR in the same URI.

This works fine, but there is an annoying problem in Safari and Chrome: both continue to show the "page load" animation while any XHR is active. Chrome goes even further and retains an animated cursor, which makes the application unusable.

Is there any way to disable this behavior? I believe that this was done intentionally for security reasons, so the user can always know that the page is loading something. However, both FF and IE handle XHR differently.

+4
source share
2 answers

An animated loading indicator means that the page is loading. This can happen for the XHR series directly started with the window.onload () event handler. If these XHR calls are wrapped in a setTimeout () call, the page will be loaded with a listen to asynchronous events.

+2
source

I think this happens to request synchronization to the URI. You want to try an asynchronous request. I think they are treated differently.

0
source

All Articles