I have gone through this question, but I am getting file not exists for the URL which definitely has content.
$.ajax({
    url: 'https://www.sec.gov/Archives/edgar/data/1550053/000168316816000505/grandperfecta_10k-073116.htm',
    type: 'HEAD',
    error: function() {
        alert('not exists');
    },
    success: function() {
        alert('exists'); //file exists
    }
});
}
Actual_Result: not exists
Expected_Result: exists
 
    