How do I check if a file on my server exists in jQuery or pure JavaScript?
It works for me, use iframe to ignore browsers show GET error message
var imgFrame = $(''); if ($(imgFrame).find('img').attr('width') > 0) { // do something } else { // do something }