I am trying to find out whether or not a file exists, before trying to download it. The file is a ClickOnce application.
I have already tried the following code, but this does not work (maybe because the URL is on a different server and domain?);
$.ajax({
    url: 'http://www.example.com/somefile.ext',
    type: 'HEAD',
    error: function()
    {
        //File does not exist
    },
    success: function()
    {
        // File exists
    }
});
Is there another solution, or is there a means to get this one to work?
 
     
     
     
     
    