diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5f72c5874..000000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -doc.odt -cktest.html diff --git a/doc.md b/doc.md index 613a07006..c4ad91d19 100644 --- a/doc.md +++ b/doc.md @@ -1,7 +1,7 @@ # HTML5 Speedtest > by Federico Dossena -> Version 4.2, April 26 2017 +> Version 4.2.1, May 15 2017 > [https://github.com/adolfintel/speedtest/](https://github.com/adolfintel/speedtest/) @@ -31,7 +31,7 @@ To install the test on your server, upload the following files: * `speedtest_worker.min.js` * `garbage.php` * `getIP.php` -* `empty.dat` +* `empty.php` You may also want to upload one of the examples to test it. Later we'll see how to use the test without PHP. @@ -139,11 +139,11 @@ w.postMessage('start {"param1": "value1", "param2": "value2", ...}') * __url_dl__: path to garbage.php or a large file to use for the download test * Default: `garbage.php` * __Important:__ path is relative to js file -* __url_ul__: path to ab empty file or empty.dat to use for the upload test - * Default: `empty.dat` +* __url_ul__: path to ab empty file or empty.php to use for the upload test + * Default: `empty.php` * __Important:__ path is relative to js file -* __url_ping__: path to an empty file or empty.dat to use for the ping test - * Default: `empty.dat` +* __url_ping__: path to an empty file or empty.php to use for the ping test + * Default: `empty.php` * __Important:__ path is relative to js file * __url_getIp__: path to getIP.php or replacement * Default: `getIP.php` @@ -186,7 +186,7 @@ __Important:__ do not simply kill the worker while it's running, as it will leav ## Using the test without PHP -If your server does not support PHP, or you're using something newer like Node.js, you can still use this test by replacing `garbage.php` and `getIP.php`. +If your server does not support PHP, or you're using something newer like Node.js, you can still use this test by replacing `garbage.php`, `empty.php` and `getIP.php` with equivalents. ### Replacements @@ -199,6 +199,9 @@ If you're using Node.js or some other server, your replacement should accept the It is important here to turn off compression, and generate incompressible data. A symlink to `/dev/urandom` is also ok. +#### Replacement for `empty.php` +Your replacement must simply respond with a HTTP code 200 and send nothing else. You may want to send additional headers to disable caching. + #### Replacement for `getIP.php` Your replacement must simply respond with the client's IP as plaintext. Nothing fancy. @@ -206,7 +209,7 @@ Your replacement must simply respond with the client's IP as plaintext. Nothing You need to start the test with your replacements like this: ```js -w.postMessage('start {"url_dl": "newGarbageURL", "url_getIp": "newIpURL"}') +w.postMessage('start {"url_dl": "newGarbageURL", "url_ul": "newEmptyURL", "url_ping": "newEmptyURL", "url_getIp": "newIpURL"}') ``` diff --git a/empty.dat b/empty.dat deleted file mode 100644 index e69de29bb..000000000 diff --git a/empty.php b/empty.php new file mode 100644 index 000000000..7395f6cc7 --- /dev/null +++ b/empty.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/example2.html b/example2.html index af945dfea..cf228ba7f 100644 --- a/example2.html +++ b/example2.html @@ -85,7 +85,7 @@