IE XMLHttpRequest.upload.onprogress event issues

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
DSDev7
Posts: 2
Joined: March 16th, 2015, 9:49 am

IE XMLHttpRequest.upload.onprogress event issues

Post by DSDev7 »

I know, this is the wrong place to ask such question but I really need your help.
I asked same question on StackOverflow (http://stackoverflow.com/questions/3964 ... s-properly) but still no answers.

I send 4 POST requests in parallel. Normal browsers like Chrome and Firefox generate upload onprogress events evenly. But IE (tested on versions 10 and 11) generates events only when requests are finished or aborted or on half of upload. My code looks like this:

Code: Select all

function XHRUpload(/* ... */) {
    //...
    this.request = new XMLHttpRequest();
    this.request.onreadystatechange = function() {};
    this.request.upload.onprogress = function(e) {
        console.log(e.loaded, e.total);
    };
    this.request.onerror = function(e, msg) {
        //...
    };
    this.request.ontimeout = function(e, msg) {
        //...
    };
    this.request.open('POST', this.url, true);
    this.request.setRequestHeader('Content-Type', 'text/plain;charset=utf-8');
}

XHRUpload.prototype.upload = function() {
    this.request.send(this.options.data);
};

XHRUpload.prototype.abort = function() {
    this.request.abort();
};
Data for uploading is a huge string (20Mb). Each thread takes the same object that contains this data as a field. Can this cause the issue?
Post Reply