I load images from the internet as such:
img.src = 'some_path'
I noticed that some images take a long time to load if the network is slow, and some take a long time to load and then fail.
Sometimes, the domain is down all together. If the server is down, this works well, because an error will be thrown pretty quickly and I can catch the error and change the src
accordingly.
However, for pages that are slow and then fail - I see that the browser displays some sort of blank box for what seems like 10 seconds or more before finally erroring out.
It seems like way too long. I'd say give the site about 4 seconds and then throw an error if it does not respond.
Is there anyway to adjust this?
The amount of time the client waits before throwing an error?
It just looks sloppy to have this sort of blank blox staring at the user for 10 or more seconds.
Currently in FireFox.