function load1() { window.URL = window.URL || window.webkitURL; var xhr = new XMLHttpRequest(); xhr.open('GET', 'git.docx', true); xhr.responseType = 'blob'; xhr.onload = function (e) { if (xhr.status === 200) { window.location.href = window.URL.createObjectURL(this.response); } else { console.log("CORS failed. Check Internet Connection.") } }; xhr.send(); }