How do I check if a file on my server exists in jQuery or pure JavaScript?
This works for me:
function ImageExist(url) { var img = new Image(); img.src = url; return img.height != 0; }