From ba58805e475102833015f9a44e764d3ac1011702 Mon Sep 17 00:00:00 2001 From: dosse91 Date: Thu, 2 Feb 2017 08:05:42 +0100 Subject: [PATCH] Points to new domain --- README.md | 6 +++--- garbage.php | 2 +- speedtest_worker.js | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 196331f..5888cd1 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ No Flash, No Java, No Websocket, No Bullshit. This is a very lightweight Speedtest implemented in Javascript, using XMLHttpRequest and Web Workers. ## Try it -[Take a Speedtest](http://speedtest.adolfintel.com) +[Take a Speedtest](http://speedtest.fdossena.com) ## Compatibility Only modern browsers are supported (Edge 12+) ## Requirements - A reasonably fast web server - - Some way to generate garbage data using either the included PHP script, a [big file of random data](http://downloads.adolfintel.com/geth.php?r=speedtest-bigfile), or a symlink to /dev/urandom + - Some way to generate garbage data using either the included PHP script, a [big file of random data](http://downloads.fdossena.com/geth.php?r=speedtest-bigfile), or a symlink to /dev/urandom - Your server must accept large POST requests (up to 10 Megabytes), otherwise the upload test will fail - Client side, there must not be any type of buffering (such as a proxy), or you may get incorrect results - It's also better if your server does not use compression, but it's not mandatory @@ -21,7 +21,7 @@ Only modern browsers are supported (Edge 12+) See the examples, it's really simple. ## License -Copyright (C) 2016 Federico Dossena +Copyright (C) 2016-2017 Federico Dossena This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/garbage.php b/garbage.php index c80e9e9..f2de04a 100644 --- a/garbage.php +++ b/garbage.php @@ -17,7 +17,7 @@ header("Pragma: no-cache"); // Generate data $data=openssl_random_pseudo_bytes(1048576); // Deliver chunks of 1048576 bytes -while(1){ +for($i=0;$i<100;$i++){ echo $data; flush(); } diff --git a/speedtest_worker.js b/speedtest_worker.js index 4589dd3..a2a5e68 100644 --- a/speedtest_worker.js +++ b/speedtest_worker.js @@ -82,9 +82,12 @@ function ulTest(done){ }.bind(this); xhr.open("POST",settings.url_ul+"?r="+Math.random(),true); xhr.setRequestHeader('Content-Encoding','identity'); - var r=new ArrayBuffer(10485760); - try{var w=new Float32Array(r);for(var i=0;i