Capture 404 status with jQuery AJAX

Replace your error function as follows…

error:function (xhr, ajaxOptions, thrownError){
    if(xhr.status==404) {
        alert(thrownError);
    }
}

Leave a Comment