问题描述
AFAIK,链接上的 rel =nofollow
属性指示搜索引擎在抓取您的网站时不要通过该链接,从而切断您之间关系的所有假设网站和链接的网站,因此,不分享您的任何SEO优点。在大多数情况下,这是评论系统中的 Good Thing™。
AFAIK, the rel="nofollow"
attribute on links instruct search engines not to follow through the link when it crawls your site, therefore severing all assumption of relationship between your site and the linked site, and therefore, not sharing any of your SEO goodness. For the most part, that's a Good Thing™ on a comment system.
现在,在我的网站上集成了一个Disqus系统后,我注意到了评论者姓名链接到各自的网站没有 nofollow
。这种情况在我脑海中引起了警报 - 也就是说,直到我意识到这些是通过AJAX动态生成的。这意味着当搜索蜘蛛爬过我的网站时,这些链接不存在。
Now, after integrating an IntenseDebate system on my site, I noticed that the commenter names link through their respective websites without nofollow
. This kind of raised an alarm in my head --- that is, until I realized that these were generated dynamically via AJAX. Which means that these links aren't there when a search spider crawls through my site.
避免了问题。好。松了一口气。
Problem averted. Good. A good sigh of relief.
但是,有一个建议实施基于脚本的解决方案来添加 nofollow
。
But then, there are these sites that suggest implementing a script-based solution to add nofollow
.
现在我对目前对 nofollow
的理解并不好,原因有两个:
Now that just doesn't jive well with my current understanding of nofollow
, for two reasons:
-
如上所述,当蜘蛛抓取您的网页时,链接不存在。所以
nofollow
没有意义,因为就蜘蛛而言,毕竟没有什么可以遵循的。
As mentioned, the links aren't there when a spider crawls your page. So it doesn't make sense to
nofollow
it, because as far as the spider is concerned, there isn't anything to follow after all.
关于静态链接,蜘蛛无法运行脚本在您的标记上添加 nofollow
,因此链接指向蜘蛛可以关注将不会被修改,因此,跟随
链接。
Regarding static links, a spider wouldn't be able to run the script to add nofollow
on your markup, so links that a spider can follow will be unmodified, and therefore, are follow
links.
我在这里遗漏了什么吗? 使用Javascript动态地将 nofollow
添加到链接是否真的有用?
Am I missing something here? Is it actually useful to dynamically add nofollow
to links using Javascript?
推荐答案
从(强调我的):
我们有能力在我们需要或想要的
时执行大部分JavaScript。如果您通过JavaScript宣传
,请注意以下事项:您可以在JavaScript链接上使用 NoFollow
We do have the ability to execute a large fraction of JavaScript when we need or want to. One thing to bear in mind if you are advertising via JavaScript is that you can use NoFollow on JavaScript links
关于该主题的其他辩论:。
Additional debate on the topic: https://webmasters.stackexchange.com/questions/5653/does-the-google-spider-render-javascript.
这篇关于使用Javascript添加`nofollow`是没用的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!