HTML image from outside source sometimes loads and sometimes not
I'm generating <img src=
html in a php web-site. The sources of the pictures come from outside sources, like instagram and such (vary). Sometimes, the pictures don't load in the browser and I see an "X" instead of the picture. The image url (right click) points to the right location. If I refresh the page sometimes it does load, sometimes only some, sometimes all the pictures. I don't really understand the pattern.
Can someone point me to possible reasons?
开发者_如何学CUPDATE due to comments below: How can I check the external server's response? If it failed can I request again? Should I?
You can use Firebug for network monitoring alternatively you can run wireshark to view HTTP requests for the images and the server's response (or failure to respond).
It might be that the server serving the images cannot cope with a series of requests in quick succession or that it implements some sort of request throttling. I'd temporarily copy some images to a different server for a comparative test.
精彩评论