In general, did so

$.ajax({ xhr: function () { var xhr = new window.XMLHttpRequest(); //Download progress xhr.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; progressElem.html(Math.round(percentComplete * 100) + "%"); } }, false); return xhr; }, }); 

The boss writes that you need to pull XMLHttpRequest out of jquery. Dislike var xhr = new window.XMLHttpRequest ();

I believe this breaks browser compatibility,

  • I believe this breaks browser compatibility, which version of IE do you support? - vp_arth

1 answer 1

  xhr: function () { var xhr = $.ajaxSettings.xhr(); if (xhr.upload) { xhr.upload.addEventListener('progress', function (event) {}