4
votes

Is there a way to disable the busy indicator (loading spinning) of the browser tab with JavaScript? I want to disable this behavior when an iframe loads.

1
I think it is not possible to override this browser behaviour. Or do you mean Javascript within a Plugin (Add-On) for a specific Browser (like Firefox)? That is more likely to be possible.mondjunge
To be more specific: If you load your IFrame with ajax (asynchronous javascript) your browsers loading spinner will not spin. When you navigate within the IFrame you might get the spinner again, depending on if the site you iframe uses ajax loading or not.mondjunge

1 Answers

2
votes

Not all browsers show browser busy indicators for content loading in iframes: it's sort of up to the vendor. If you're loading a page in an iframe, you can't suppress the indicators in browsers that do, nor turn it on in the browsers that don't.

In chrome, even creating a completely empty iframe ('') still briefly triggers the busy indicator so I don't think you could cheat by using srcdoc or iframe.contentDocument. You could get away with loading most of the iframe's content with ajax (which would not trigger it further) I don't think you could make it 100% silent.