Friday, 13 September 2013

html, make page appear ready (no tab spinning wheel) while just waiting for images

html, make page appear ready (no tab spinning wheel) while just waiting
for images

I have a page that loads images from various sources. Occasionally these
images fail to load; perhaps the link has gone dead or whatever. That's
fine.
What bothers me is that the browser might take 6 seconds or even longer
(I've seen 20 seconds) before it decides that the image has failed to
load. During this time the spinning loading wheel in the Chrome tab keeps
going and going, making it seem like my page isn't ready.
I've switched my javascript loading from onload to $(document).ready() so
at least my page isn't inactive while it waits for the images to load. But
it might appear as though it is.
But is there some way to make my page appear "ready" (no spinning wheel)
when all it's doing is waiting for the image? Maybe another way to load
images? I currently use the img element with src. Or a way to make it give
up sooner? Does it really need 6 seconds to decide that an image link is
dead?
Not sure if this has a solution. It's a problem that I have seen on a lot
of websites, not just mine, but it drives me nuts. I'll often click the
stop-loading-x just to make it stop! I'd at least like for my own website
to not be like that.

No comments:

Post a Comment