2004年03月15日
検索エンジンは JavaScript のリンクをクロールできますか?
Google は JavaScript で記述されたリンクでもクロールできますが、100% クロールするわけではないのでテキストリンクも併せて設置しておきましょう。
■質問
検索エンジンは JavaScript で記述したリンクをクロールすることができますか?
(質問者:読者の方)
■回答
一般的に検索エンジンは JavaScript で記述されたメニューなどに書かれたリンクを読むことが出来ません。Google は JavaScript リンクでも読むことができますが、どんな形式の JavaScript リンクでも読むわけではないようです。
基本的には、JavaScript 内にファイル名があればそれをクロールするようです。また、onmouseover などの複雑な記述がない方が良いとも言われます。いずれにせよ、JavaScript リンクが 100% クロールされる保証はないので、確実に全ページをクロールさせて Google インデックスに登録したいのであれば、アンカータグによるテキストリンクを全ページに設置しましょう。またサイトマップの設置も必要不可欠です。
ref.
tedster says:: To add to Brett's comment, a Google engineer named Matt Cutts who was at our Boston Conference mentioned that Google is trying very hard to find all the pages it can. So in doing this, they will take javscript that is on an HTML page and look for a URL in it. They don't execute the script, they just look at it as text. But if there's a character string there that looks like it might be a URL (starts with HTTP://) then they will try to access that page.He wasn't clear about whether this kind of crawling would pass on PR the way an HTML link will. But for now it does require that the js is on the page, not in an external file.
One organization I consult with put up a new website several months that uses exactly the technique you're talking about. Their inner pages have not been crawled and I don't expect that they will be within the near future. (WebmasterWorld / I need visible javascript links )
