I’ve been noticing this from time to time myself on various websites. I don’t think it’s browser related, since you’re running Firefox and I’m running Chrome.
I can’t specifically say what it is in your case, but I have several ides of what it might be, and I kind of sort of know what it is in mine.
Become a Patron of Ask Leo! and go ad-free!
Web pages have become incredibly complex. It’s pretty amazing. You think that you’re accessing a single page on a simple site like say, askleo.com. I just did a test of one page: “What Security Software do you Recommend?”. Just loading that one page makes 344 different requests from at least 51 different domains – and my pages aren’t nearly as complex as some of the other sites you might visit every day. (Though based on the results, I might be trimming a few things now that I’ve looked at it!)
Once you throw in advertising, analytics, images and who knows what else… it all adds up.
So, why does that matter? It impacts the overall page speed, of course, but eventually everything loads, right?
Just one delay or failure
Well here’s why, on some pages, that spinning ball might keep spinning: If there’s a hiccup with even one of those 300+ requests – a hiccup that causes the browser to wait for a response that might never actually come – the browser will see the page as still loading, and it will keep spinning that little page loading indicator until it times out.
My experience is that when this happens, the hiccup usually doesn’t matter. By that I mean, I often can’t tell what’s missing or what’s causing the problem. Maybe it’s an image that didn’t load, some random analytics file, or some random advertisement. The bottom line is that it’s something that might not matter, and that I would never notice.
So, where do these hiccups come from? Well, I can’t speak for you, but my current ISP setup is occasionally dropping DNS requests. By that I mean, the browser’s going to ask “What’s the IP address for askleo.com?” and the DNS request times out after, as it turns out, a fairly long time. So with 51 different domains being referenced on a single page, I have a chance of that happening to me. And it does. It’s something that I need to work out with my ISP. Unfortunately, the ISP I’m talking about is in the process of being phased out after being purchased, and it’s a mess, with no real support.
But basically, anything that interrupts the communication between your browser and the various resources on the web page could manifest as a page that never finishes loading, or at least takes an exceptionally long time.
Repeated refresh and infinite scroll
There are two other scenarios that come to mind as well. You mentioned refreshing. Yes, a web page can tell the browser “reload me every so many seconds”. Not many do and not many do it very quickly. But whatever the time is, if the page actually takes longer to load than that set time, it will never finish loading before it starts loading over again. If you have a slow internet connection, for example, that could be at play for pages that do this.
Another scenario are pages that we now call “infinite scroll”. Infinite scroll is where some websites use a model where you don’t go page to page, but rather you just keep scrolling down. Facebook is a great example: when you scroll down some amount the browser then fetches more content automatically to keep throwing on to the bottom of what you are looking at. Depending on how the page is built, this can actually appear as constantly loading – as can pages that update a portion of themselves, such as little new message notifications, without needing you to actually reload the page.
I’m not saying that all websites that use infinite scroll or automatically reload after a certain amount of time cause the page to be constantly loading. In fact, if properly written, they don’t have to. But if they’re written a different way, they certainly can. But bottom line, my money’s on the complexity of web pages and the numerous opportunities of any single hiccup to slightly confuse your browser into thinking that it’s not done.