I have in my application some references to Twitter photos.
When the photo is no longer available on Twitter side (see this example: http://p.twimg.com/AmL3hpaCEAd2wtN.jpg), I receive a 404 response code with an image as a body (the gray 404 image)
I'm using onload
and onerror
javascript methods on Img, but since p.twimg.com is returning a body, the onload
method is triggered. I found no way to distinguish a 404 response from a 200 one.
Any idea?