Will Googlebot crawl changes to the DOM made with JavaScript?

googlebot, jquery, seo, web-crawler

Solution

It looks like Google spider does execute some JavaScript, but I do not believe it would execute large libraries like jQuery..

Please check interview with Matt Cutts

Matt Cutts: "For a while, we were scanning within JavaScript, and we were looking for links. Google has gotten smarter about JavaScript and can execute some JavaScript. I wouldn't say that we execute all JavaScript, so there are some conditions in which we don't execute JavaScript. Certainly there are some common, well-known JavaScript things like Google Analytics, which you wouldn't even want to execute because you wouldn't want to try to generate phantom visits from Googlebot into your Google Analytics".

There are also some additional details on Google Spider improvements (JavaScript/AJAX support) on Google Webmaster Central Blog

Problem

For SEO, I have been tasked with adding a `rel="nofollow"` to all external links*. The simplest and least obtrusive way to add `rel="nofollow"` to each external link is with some jQuery. I've done this fine but I'm now wondering: Does Google see changes made during jQuery's document load to the DOM (such as this one) or does it only see the original source code? I don't want to discuss why this is a bad idea or not. This is an SEO consultant's decision and I've learnt that unless implementation of their latest whim takes too much time to just go along with what they want

Original source