3 ms·
Seems reasonable to me. My guess is that it's not performance, but rather predictability, that matters here. Being able to detect when a page meaningfully chang
by jchw 9y ago
Seems reasonable to me. My guess is that it's not performance, but rather predictability, that matters here. Being able to detect when a page meaningfully changes is probably useful for Google, and a good implementation of Math.random() would potentially thwart that. Especially seeing how many pages have the magic constant in them...
Also, probably useful for determining two pages are the same, which may be needed to help prevent the crawler from crawling a million paths into a SPA that don't actually exist, for example.
- taf2 9y agoI wonder if they also reimplement or adjust crypto api since it offers better random numbers
- jchw 9y agoIf I had my guess, my guess would be Googlebot simply disables the API. It's new enough that this would be reasonable, and executing real crypto in context of Googlebot is probably rarely desirable.