views:

228

answers:

2

Can I control the browser's loading state with JavaScript?

I.e., I want the browser to display its native "loading" animation, not my own loading icon in the page, but the one that appears instead of the favicon while the browser is loading the page.

+1  A: 

You can make the browser load some page (in an invisible iframe for instance)

Maurice Perry
A: 

I once built a page which would get into an infinite loop of making AJAX requests as soon as the page loaded. It would make an ajax request, update something on the page, and then repeat the request, etc..

I had about 4-6 of these loops fired off right at the page load which would each retrieve and update the status of one 'auction' on the homepage.

It had the effect of the page always remaining in that 'loading' state, i.e the progress bar always showing and the loading animation showing in the address bar. The client didn't want that so I put an interval of 2 seconds between each request, however it might work for you.

Click Upvote