A webpage contains few images, 5-10, average size.
Sometimes, randomly, the loading of an image fails and it is not displayed.
Let say that every 100 images loaded 1 fails.
That may happen because the server is busy or there is a temporary network problem, any reason..
I know for sure that the request to obtain the image is valid so if I retry to load the image I have very good chances to get it.
I have code to detect when an image fails to load and trigger a callback.
But then, how can I tell the browser "retry loading that image" ?
Can I just remove the image from the DOM and put it back again?
If I append to the URL a random query string the image will be reloaded for sure but I'd prefer to avoid that because the image won't be properly cached.
I'm using jQuery, so a jQuery solution is good for me as pure JavaScript.