Question

I'm using XMLHTTPRequest binding to receive asynchronous events from the server. XHR opens a server URI and then hangs until an event comes or timeout occurs, in any case JS fires a new XHR on the same URI immediately.

This works fine, but there is an annoying problem in Safari and Chrome: both keep showing "page loading" animation while any XHR is active. Chromes goes even further and keeps animating cursor, effectively making the application unusable.

Is there any way to disable this behaviour? I believe this is done intentionally for security reasons, so user could always know if page is loading anything. Still, both FF and IE treats XHR differently.

Was it helpful?

Solution

The animated loading indicator means that the page load is in progress. This may happen for series of XHR, directly started from window.onload() event handler. If these XHR calls will be wrapped into setTimeout() call, the page loading will be finished with binding to asynchronous events listening.

OTHER TIPS

I think this happens for sync request to a URI. You many want to try an async request. I think they are treated differently.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top