1

I create a HTML link like this.

<a href='http://www.mywebsite.com/aPage' onclick='customFunc(); return false;'>Show Info</a>

I'm writing an ajax functionality (in customFunc) when this link is clicked and displaying data which is same as the data shown by the link in HREF tag.

Question: When search engines see my link, will they cache it? Or will they get an impression that I'm trying to do a false magic to get this page cached, and hence ignore it?

Appreciate your suggestions.


Edit: So what I interpret from this Q & A is that, (theoretically) search engines are just bothered about the href, and since it found one in the above link - it will cache this page without any troubles and it won't be worried about the things I do in the onclick JS call.

If anyone has a different opinion, please do add your comments.

4

2 回答 2

0

蜘蛛会自动跟随您页面中的每个锚点。如果您想避免这种行为,您必须为要跳过的“a”标签指定rel="nofollow" 。您还可以避免使用元标记或 robots.txt 将整个页面编入索引。无论如何,附加的事件侦听器在理论上与搜索引擎无关......我在这里查看了谷歌的 SEO 指南:http ://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf我没有读到像你这样的场景。

于 2012-08-24T07:27:30.583 回答
0

虽然像谷歌这样的搜索引擎现在解释了一些 javascript,在这种情况下,它会清楚地看到.href而看不到rel="nofollow".

于 2012-08-24T07:28:19.773 回答