且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过将Ajax内容加载影响SEO /搜索引擎?

更新时间:2023-12-05 09:43:58

简短的回答:这要看

这里的原因 - 说你有,你希望有索引的一些内容 - 在这种情况下使用Ajax加载它会确保它不会。因此,这些内容应能正常加载。

Here's why - say you have some content that you want to have indexed - in that case loading it with ajax will ensure that it won't. Therefore that content should be loaded normally.

在另一方面,说你有,你要索引一些内容,但由于某种原因,你不想表现出来(我知道这是不推荐,是不是很高兴最终用户无论如何,但也有合法的用例),就可以正常加载这些内容,然后隐藏,甚至使用JavaScript代替它。

On the other hand, say you have some content that you wish to index, but for one reason or another you do not wish to show it (I know this is not recommended and is not very nice to the end user anyway, but there are valid use cases), you can load this content normally, and then hide or even replace it using javascript.

对于你的情况下,你已经不断加载的内容 - 你可以确保它是通过提供链接的搜索引擎/非JS启用用户代理索引。例如,你可以有一些类似Twitter的内容,并在它的结束更按钮链接到从你显示的最后一个项目开始的内容。您可以使用JavaScript隐藏按钮,使普通用户永远不知道它的存在,但爬虫将索引的内容(点击链接)反正。

As for your case where you have "constantly loading" content - you can make sure it's indexed by providing links to the search engines/non-js enabled user agents. For example you can have some twitter-like content and at the end of it a more button that links to content starting from the last item that you displayed. You can hide the button using javascript so that normal users never know it's there, but the crawlers will index that content (by clicking the link) anyway.