Math.random() function produces an entirely deterministic series. I created a small script which uses this identify Google in an obfuscated fashion:
The first time Googlebot calls
Math.random() the result will always be
0.14881141134537756, the second call will always be
0.19426893815398216. The script I linked to above simply uses this fact but obfuscates it a little and ‘seed’ it with something that doesn’t look too arbitrary.
Crawling at Google Scale
- More secure
- Predictable – Googlebot can trust a page will render the same on each visit
Speeding up the clock…
The second date is a date from the future! Marty McFly would be proud.
I did wonder if the random number generation sometimes updates, but a Google search for
0.14881141134537756 turns up over 18,000 results, so it seems like it is quite stable. After discovering this I Google about a bit and found an old Hacker News comment by ‘KMag’:
So it seems things were similar to this for some time now, but instead of
random() always returning
0.5, it became a deterministic series. The date is actually accurate initially, but can go into the future, as seen above. KMag went on to say:
Which doesn’t seem to be the case, but I’m unsure this allows you to do much you couldn’t do based on User-Agent / IP, but perhaps does allow you to do it with some plausible deniability!
Source: Tom Anthony