Browse Source

Simplified IE11 upload test

adolfintel 6 years ago
parent
commit
513ddc5905
2 changed files with 1 additions and 11 deletions
  1. 1 11
      speedtest_worker.js
  2. 0 0
      speedtest_worker.min.js

+ 1 - 11
speedtest_worker.js

@@ -460,21 +460,11 @@ function ulTest(done) {
 				}
 				if (ie11workaround) {
 					// IE11 workarond: xhr.upload does not work properly, therefore we send a bunch of small 256k requests and use the onload event as progress. This is not precise, especially on fast connections
-					xhr[i].onload = function() {
+					xhr[i].onload = xhr[i].onerror = function() {
 						tverb("ul stream progress event (ie11wa)");
 						totLoaded += reqsmall.size;
 						testStream(i, 0);
 					};
-					xhr[i].onerror = function() {
-						// error, abort
-						tverb("ul stream failed (ie11wa)");
-						if (settings.xhr_ignoreErrors === 0) failed = true; //abort
-						try {
-							xhr[i].abort();
-						} catch (e) {}
-						delete xhr[i];
-						if (settings.xhr_ignoreErrors === 1) testStream(i, 0); //restart stream
-					};
 					xhr[i].open("POST", settings.url_ul + url_sep(settings.url_ul) + "r=" + Math.random(), true); // random string to prevent caching
 					xhr[i].setRequestHeader("Content-Encoding", "identity"); // disable compression (some browsers may refuse it, but data is incompressible anyway)
 					xhr[i].send(reqsmall);

File diff suppressed because it is too large
+ 0 - 0
speedtest_worker.min.js


Some files were not shown because too many files changed in this diff