Googlebot何时执行javascript? [英] When does Googlebot execute javascript?

查看:111
本文介绍了Googlebot何时执行javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在多个域上有一些单页Web应用程序,这些应用程序严重依赖javascript/ajax来获取和显示内容.根据日志和搜索结果,我可以知道googlebot在某些域上运行javascript,而在其他域上则不运行.在某些情况下,它索引了仅在js上可用的所有内容,甚至似乎根本没有在运行js.

有人可以告诉我googlebot如何决定要运行的js,是否可以通过其他方式在其他域上运行js?

PS:我知道通常应该为此使用服务器端渲染之类的东西,但是我完全不依赖于搜索结果和排名,因此这确实不值得付出努力.我很好奇googlebot如何决定它是否应该运行js,以及是否有什么简单的方法可以在其他域上进行更改.

解决方案

您可以在此处直接从Google开发者网站了解有关Google如何渲染基于Ajax的网站的更多信息以及最佳做法的列表:

https://webmasters.googleblog.com/2014/10/updating-our-technical-webmaster.html https://developers.google.com/webmasters/ajax-crawling/

首先要解决您的特定问题,建议您使用具有作为Google抓取"功能的Google网站站长工具分析每个域,并仔细研究Google指南中提到的所有技术方面.

https://support.google.com/webmasters/answer/158587? hl = zh_CN

I have a few single page web apps on multiple domains that heavily rely on javascript/ajax to fetch and show content. Based on logs and search results I can tell that googlebot runs javascript on some of the domains but not on others. On some it indexes everything thats only available with js on others it doesn't even seem to run js at all.

Can anybody tell me how googlebot decides what js to run and if I can to anything to get it to run js on my other domains?

PS: I know that normally I should use something like serverside rendering for this, but I'm not at all depended on search results and rankings, so its not really worth the effort. I'm just curious how googlebot decides whether it should run js or not and if there's anything easy I can do to change that on my other domains.

解决方案

You can learn more about how Google render ajax based website and a list of best practice directly from Google developer website here:

https://webmasters.googleblog.com/2014/10/updating-our-technical-webmaster.html https://developers.google.com/webmasters/ajax-crawling/

Regarding your specific problem as first thing, I suggest you to analyse each domain using Google Webmaster tool with functionality "Fetch as Google" and go trough every technical aspects mentioned in Google guide.

https://support.google.com/webmasters/answer/158587?hl=en

这篇关于Googlebot何时执行javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆