A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

A way to control the page loading indicator

ChrisP
2018-06-20

Currently our webapp has Javascript that loads the main document, after dom loaded event fires, to remove the loading indicator or loading “favicon”.

The problem with the page load indicator is that our app is downloading resources in background, and the loading icon does not go away. A hack around it is to include a small js file that executes on page load, which loads the main document.

The page load indicator gives a perception to the user that the page is slow, even though main content has loaded, and background prefetching is taking place.

mkay581
2018-06-20

Maybe the DOMContentLoaded event may be what you need here? Or is that what you are already using? Also what resources exactly are still being fetched in the background?

Tigt
2018-06-23

Does the indicator still spin when using standard ways of background fetching like <link rel="prefetch"> and a Service Worker adding things to the Cache API?

simevidas
2018-06-24

How exactly are you loading those resources?