问题
You've seen this - on an ajax-heavy page, like meebo.com, the browser never stops 'spinning', it never indicates that it's finished loading. What causes this, and is there any way to consistently tell the browser (whatever browser it may be), that loading has completed?
EDIT: Sorry, I should've specified that I'm a developer here. I've noticed this on other sites, and now one of mine as well that's using ajax. I want to make sure that when an ajax call comes back, the page stops 'loading'.
回答1:
I answered this question in another question:
Stop the browser "throbber of doom" while loading comet/server push iframe
There are browser-specific techniques to make the spinning stop, or not to begin spinning at all and still load data with a server-push.
回答2:
If you with javascript uses document.open() to write stuff to your page, the spinner will spin until you actually invoke document.close().
回答3:
No solution for the AJAX call per se, but I did find a solution for uploads to iframes, which is the pseudoAJAX technique for uploads. If you remove the iframe from the DOM and then put it back, the browser will stop the upload. Neat little trick.
回答4:
This is also a well-known bug on IE when attaching behaviors dynamically to a page or requesting a lot of objects.
Microsoft KB Article - behaviors
Microsoft KB Article - requests
来源:https://stackoverflow.com/questions/852605/browser-continues-loading-after-ajax-request-finishes