googlebot 能否识别 HTML标签被javascript改变了?

发布于 2024-10-25 04:39:38 字数 183 浏览 5 评论 0原文

我的网站上有一个搜索引擎,它通过 ajax 运行。我希望每次搜索尝试都有一个特定的 </code> 。为了实现这一点,我每次收到 ajax 的响应后都必须进行更改。

您知道 googlebot 是否会看到此更改并使用它来索引我的网页吗?

感谢您的帮助!

I have a search engine on my website and it works via ajax. I want to have a specific <title> for each search attempt. To achive that I have to alter every time after I recieve a response from ajax.

Do you have any idea if googlebot will see this altered and use it to index my webpage?

Thanks for any help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

死开点丶别碍眼 2024-11-01 04:39:39

您知道 googlebot 是否会发现此更改并使用它来索引我的网页吗?

很可能不会。

您应该在服务器端更改标题。

Do you have any idea if googlebot will see this altered and use it to index my webpage?

Most likely not.

You should change the title on server side.

失与倦" 2024-11-01 04:39:39

Google bot 执行的操作类似于使用记事本打开页面 URL。它将把 JavaScript 代码视为纯文本,并尝试更改标题;但它当然不会看到脚本执行的结果。

编辑

启用 Ajax 的网页使用相同的原理进行抓取,除非它们遵循启用 Ajax 的网站的技术,如 google 建议的那样:
AJAX 抓取:网站站长和开发人员指南

Google bot does something similar to opening the page URL using notepad. It will see the JavaScript code as a plain text, which tries to change the title; but it will not see the result of the script execution of course.

EDIT:

Ajax enabled web pages are crawled using the same principle, unless they follow the techniques for Ajax-enabled web sites, as suggested by google:
AJAX crawling: Guide for webmasters and developers

天气好吗我好吗 2024-11-01 04:39:39

好吧,谷歌在过去几年中为其搜索引擎添加了许多功能,也许它能够看到这些变化。但是您如何想象客户应该到达一个地址不变但内容在点击几次后发生变化的页面?必须将AJAX与普通的独立页面结合起来;这还将增加对禁用 JavaScript 的客户端的兼容性。例如,如果启用了 JavaScript 并且用户代理字符串与 *bot* 不匹配,则所有页面都会重定向到使用 AJAX 的页面。

Well, google added many features to its search engine over past years, and probably it will be able to see the changes. But how do you imagine a client should reach a page which address doesn't change, but content does after few clicks? You must combine AJAX with normal separate pages; this will also add compatibility for clients that have JavaScript disabled. E.g. have all pages redirect to the one working with AJAX if JavaScript is enabled and user-agent string doesn't match *bot*.

我的黑色迷你裙 2024-11-01 04:39:39

简而言之,Google 不会为您页面中的任何动态内容编制索引。

正如斯拉瓦所说,谷歌在过去几年中为其搜索引擎添加了许多功能,也许它能够看到这些变化。但即使谷歌最终开始对动态变化的内容建立索引,我认为从搜索引擎优化的角度来看,这些内容不会像服务器提供的其他内容那样快速地被索引,这仍然是无趣的。

知道你得到什么和失去什么很重要。是的,您可以轻松地向页面添加功能并增强用户体验,但如果您没有对数据建立索引,您就会失去所有有趣的关键字优点。 :)

Simply, Google will not index any dynamic content from your page.

As Slava said, Google added many features to its search engine over past years, and probably it will be able to see the changes. But even if Google does eventually start indexing dynamically changed content, I think it is still uninteresting from a search engine optimization standpoint that those content will not be indexed as quickly as the others served from server.

It's important to know what you're getting and what you're losing. Yes, you may be adding functionality to your page easily and enhancing the user experience, but if you don't get the data indexed, you lose all that juicy keywordy goodness. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文