javascript - Reload image if Content-Type in header is text/html -
I have an image generator which sometimes fails and sends an error in text / html, while the situation is currently 200 is.
If there is no content type of image / JPG, what is the best way to reload the image from the same url? Should I contact it with curl headers in a different php file and if this image Is not it / JPG or is it possible to do javascript / jquery on client side?
To capture exception, you should correct the image generator script and try again at least Return status 500 instead
Comments
Post a Comment