Google And Javascript.

Publicated on : 1186362926
Nick contacted me today and told me a rather interesting story about what he found out while running a website with a special crafted Javascript. The script he made was similar to what I wrote last year, a simple reconnaissance technique to see if the user has Javascript enabled and is really a user and not a robot. It makes use of the body onmousemove since every user makes a few moves with his mouse on the screen. Now, the interesting part is that Nick created a path to a unique image. Google followed the path that constructed inside the Javascript. This tells us that Google is reading Javascript, parses the path and follows this to snoop in that path also. Now, there might be a very good reason why the Googlebot does this. While most sites use Ajax powered scripts, a lot of normal indexing would fail since the robots don't execute Javascript. But it turns out the Googlebot reads the Javascript and performs some logic upon it, extracts the paths and follows the paths. Interesting stuff, I would say.

See the example below: