Pages that never finish loading: How to diagnose

60,936

Solution 1

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.

Solution 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.

Solution 3

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.

Share:
60,936

Related videos on Youtube

Bryce
Author by

Bryce

I enjoy fixing things, and can fix just about anything that once worked. If it never worked, well, I'll give it a shot.

Updated on September 18, 2022

Comments

  • Bryce
    Bryce almost 2 years

    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.

    • Bryce
      Bryce over 9 years
      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.
    • closetnoc
      closetnoc over 9 years
      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
      closetnoc over 9 years
      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!!
    • RaisinBranCrunch
      RaisinBranCrunch almost 5 years
      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.
  • closetnoc
    closetnoc over 9 years
    Waterfall performance reports are also available in Chrome and I think Firefox as well.
  • Helping Hands
    Helping Hands over 9 years
    @closetnoc - Yes there is also good way to find cause.
  • closetnoc
    closetnoc over 9 years
    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
    closetnoc over 9 years
    BTW- I am glad to see you jumping in so quickly to answer the question. Rock and Roll!
  • Helping Hands
    Helping Hands over 9 years
    @closetnoc - Yes , Developer tool is very helpful. And Yes I am always ready to help people and post answer of their questions if I am confident and having perfect knowledge related to their questions.
  • closetnoc
    closetnoc over 9 years
    We all try that is for sure. This site seems to go in cycles where there are a bunch of questions I can answer, some I can help with, and some I have no clue about. I sit through and wait till the cycle hits that I can answer questions then I get busy. Sometimes I drop a few comments here and there in between cycles. Sometimes, I just have to wait. ;-) I am glad you are here.
  • Helping Hands
    Helping Hands over 9 years
    Yes , But sometime I am having fear to be down vote when I have little idea about question. so I avoid to answer in that type of question. And also we have no right to direct questioner in wrong direction so I believe that need to give answer only If I am sure that what I am saying/answering.
  • closetnoc
    closetnoc over 9 years
    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.
  • Helping Hands
    Helping Hands over 9 years
    Yes sure , Thanks for advice. I will follow you advice for sure.
  • Bryce
    Bryce over 9 years
    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"?
  • Helping Hands
    Helping Hands over 9 years
    @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.
  • Shreyo Gi
    Shreyo Gi over 9 years
    @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).