network.js
network.js copied to clipboard
Use random data to reduce chance of compression impacting results
Currently this package is generating data using a very small, fixed set of data. If there is any compression being done (e.g. if there is a web server in front of this that does gzip compression) , the content is going to compress incredibly well. Which is going to work against doing accurate characterization of the bandwidth or latency.
To combat this and make the bandwidth estimate more robust, the returned data should contain random data.
Consider something using something like this:
- http://stackoverflow.com/questions/4356289/php-random-string-generator
Let me know if this is of interest and I could pull together a PR.