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?
Check image size if it's 6.232bytes(Twitter not found image's size) or not.
To find image file size
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With