5

Users occasionally complain, and we probably all occasionally see, a web page that never finishes loading. In Google Chrome the spinning circle will run forever, each browser has it's own version.

One common cause is a web server that reports the wrong length for a document. The browser will wait forever for bytes that never come.

But that's not the only cause. How can one go about diagnosing a particular "never finishes loading" situation?

Edit: Pages that do this all the time are pretty easy to find. In particular I'm looking for tips to diagnose the intermittent issues, especially those where the page never loads (not just slow, these pages never report as done loading). Most pages these days have a mix of sources and probably a CDN or two, so it can get complex fast.

  • 1
    I have to say I generally see this when downloading a third-party resource such as JavaScript or an image. For that reason, I have been removing several third-party references in my sites next redesign coming soon. I also use Chrome. You can use the Developer Tools in Chrome and use the Network tab for a waterfall report to help diagnose issues. – closetnoc Jan 20 '15 at 6:12
  • Rather than remove third party references, I've switched to using a single CDN. Either it's up or down, but at least only two servers are involved: mine and the CDN. – Bryce Jan 21 '15 at 4:13
  • You have to watch for updates for example Google Analytics and AdSense. But a good idea. One warning however. It is possible that the CDN hosts files for bad sites and that as you reference these elements, your search metrics can drop in a few days or weeks. If this is the case, reverse your change immediately. You will know the drop when you see it. It will be dramatic!! Almost over-night. We have seen this here but I will say it is rather rare- not to worry- just a warning. Otherwise, this is a very wise move since it should speed things up for you radically. – closetnoc Jan 21 '15 at 4:31
  • 1
    I have also found that sometimes a page seems to be completely loaded and the little spinny-thing (technical term that I suggest using with caution) continues to spin. I have found that this will continue to happen a lot. It drives me mad (a very short trip). But I have noticed that simply closing the tab (in Chrome) and creating a new tab and going back to the site the little spinny-thing behaves well again. FYI- In case it continues to happen- it could be the browsers fail. Bad Browser Bad!! – closetnoc Jan 21 '15 at 4:37
  • If this is happening to you, make sure to check any window.onload callback or the like. The onload needs to complete before the spinner will stop. If you call an external function from your onload that does some setTimeout recursion, it'll never stop the spinner on the tab. – RaisinBranCrunch Sep 12 '19 at 22:07
4

You should do the following to get an exact reason why your page never finishes loading:

  1. Do you call any 3rd party scripts on your page? If yes, then check if they respond properly.
  2. Check your website/server for viruses and hacks.
  3. Analyze your page here or here.
  4. Make sure that your server's drive space is not full; it must have some extra space available.

The above site analyzers should help you to know why your page is loading very slowly.

| improve this answer | |
  • 2
    Waterfall performance reports are also available in Chrome and I think Firefox as well. – closetnoc Jan 20 '15 at 6:16
  • @closetnoc - Yes there is also good way to find cause. – Helping Hands Jan 20 '15 at 6:18
  • I use Chrome a lot for these things and others such as style issues and so on. I really like the Developer Tools in Chrome. It has quickly become a go to resource for me. – closetnoc Jan 20 '15 at 6:21
  • BTW- I am glad to see you jumping in so quickly to answer the question. Rock and Roll! – closetnoc Jan 20 '15 at 6:22
  • 3
    Answer questions you are confident about. But please do not fear the down-vote. Some people are just going to do that even when your answer is perfect and correct. I found that sometimes conventional wisdom is wrong. So when you give a correct answer, you get down-voted because of conventional wisdom. It has happened to me several times. I also do not want to mislead. But I like to admit I make mistakes. It not only makes me human, but gives me the opportunity to learn. I like it when someone corrects me. And let us not forget there are times where two or more answers are right and good. – closetnoc Jan 20 '15 at 6:37
2

check the website or web page with Pingdom you will get a detailed list of files loading and the time consumed by each of them.

  1. You could also use Yslow a addon for all the major browsers.

  2. another option is Google Pagespeed. You can analyse your website or web page here. Here is also a Google Chrome addon is available.

My personal choice has always been pingdom for its detailed report.

| improve this answer | |
  • Those tools are good for detecting the normal behavior of the page load. What about the abnormal behavior, where something does not come in, and thus the page spins forever "loading"? – Bryce Jan 21 '15 at 4:14
  • @Bryce - Those tools will help you in all way. Also you can do one thing that create new page with same code and try to load that page. – Helping Hands Jan 21 '15 at 6:31
  • @HelpingHands is right. The detailed report especially from pingdom will let you analyze the file that makes your page "loading" even though there's nothing to transfer (often). – Shreyo Gi Jan 21 '15 at 9:50
1

If the "wheel just keeps spinning" then it means the browser thinks it is still loading something (from somewhere). If you open your browser developer tools -> network tab (and reload the page) it should eventually show "Loaded" at the bottom, in red, ex:

enter image description here

If it does then it may be spinning waiting on some XHR resource, not sure. If it doesn't then it's either stuck waiting, loading an initial resource (ex: javascript file that is referenced, or image), or it is running some "startup javascript" that is running forever and never terminating, or possibly causing "out of memory" for the page (ex: recursive loop generating too long of a string or what not).

For the waiting-on-resources, you might be able to see one in the "network" list that is attempting to load but not finishing.

For the javascript, I found I could run it in firefox, after awhile firefox will say "A web page is slowing down your browser. What would you like to do? [Stop it][Wait]".

left side firefox

If you click "[Stop it]" then in will basically interrupt the javascript that's "currently running" (possibly/probably the offending one), and in the javascript developer console it will show the backtrace which might give you hints as to what's going awry. Apparently similar behavior is possible in chrome (if it runs out of memory at least, open the developer tools, it'll abort and let you see a trace when it runs out, interrupting it might also be possible) but it was harder to read the trace in chrome's dev tools for me (didn't show full origin url's of each trace line as easily) FWIW.

The other links in the other answers were useful as well (one of them said, in my case "browser ran out of memory" or "unable to connect to server" all indications of my problem). Another possibly useful link is this.

In my case it appeared to have been a conflict between prototype.js #inspect and the google (gapi) plusone button, causing some kind of infinite loop [?] that made it eventually run out of memory. Updating prototype seemed to "fix" it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.