From bc741920a45473af3d650f3379f654240031eaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gei=C3=9Fer=20Michael?= Date: Fri, 3 Mar 2017 14:03:21 +0100 Subject: [PATCH] abort request after onload to free ram --- speedtest_worker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/speedtest_worker.js b/speedtest_worker.js index d012e71..2bc76db 100644 --- a/speedtest_worker.js +++ b/speedtest_worker.js @@ -176,6 +176,7 @@ function dlTest(done){ }.bind(this); xhr[i].onload=function(){ //the large file has been loaded entirely, start again + xhr[i].abort();// reset the stream data to empty ram testStream(i,0); }.bind(this); xhr[i].onerror=function(){