Your example is unlikely to get you far.
Edit: in a quick test, I got a range between 8 and 49 in Chrome, and between 1.27 and 51 (!) on Firefox, on the same computer, the results are very noisy.
Your example is unlikely to get you far.
Edit: in a quick test, I got a range between 8 and 49 in Chrome, and between 1.27 and 51 (!) on Firefox, on the same computer, the results are very noisy.
To distinguish between users between of a larger set, you do more such tests and add them all together. Each test adding a few bits of information.
To make the above code more reliable, you can measure the ratio multiple times:
https://jsfiddle.net/dov1zqtL/
I get 9-10 in Firefox and 3-4 in Chrome very reliably when measuring it 10 times.
But it's also the most pathological example one can think of, yet the results are extremely noisy (while being very costly, which means you won't be able to make a big number of such test without dramatically affecting the user's ability to just browse your website).