nesk / network.js

Make accurate network measures (like Speedtest) in your browser
MIT License
297 stars 89 forks source link

Use random data to reduce chance of compression impacting results #53

Open pstoll opened 8 years ago

pstoll commented 8 years ago

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:

Let me know if this is of interest and I could pull together a PR.