A question for SEO gurus - can Google see links in JavaScript?

Hi guys,

I’m setting up a javascript-based menu for a client, and all the menu links etc. are of course all dynamically written by the script in the browser.

So I’m wondering, is this a hinderance to SEO, specifically for Google, or does Google also search inside tags for URLs in code? e.g. stuff like:<script> ... menuLink[5] = '/content/aboutus.html'; ... </script>Will Google recognise and crawl this?

If not, is there a solution, like perhaps putting all the menu links inside a tag in plain html, so Google can see all the links?

Thanks!

I believe I read recently that they are looking at doing that, but I don’t know for sure. Not sure anyone knows for sure, but maybe someone else out there is more knowledgeble than I in this area.

Ask Matt Cutts :slight_smile:

Matt Cutts: Gadgets, Google, and SEO

http://www.markcarey.com/googleguy-says/archives/google-crawls-javascript.html

One of the aforementioned links may have covered this, but your best bet is to also include text links, maybe at the bottom of the page, and a site map with direct links to the pages. This will give the spiders plenty of links to follow and find the pages.

my 2 cents…

I always advise against javascript generated links (document.redirect, etc..) but i have seen several sites that have completely javascript generated menus, and most of their pages still get indexed by Google.

i can’t divulge the names of the sites due to client confidentiality, but i can assure you that Google has logic that can read the javascript if it’s not complex.