所有搜索机器人都使用转义片段吗?
Do all search bots use escaped fragment?
我建立了一个 Angular SPA。我的一些 head
代码如下所示:
<!--title-->
<title ng-bind="$root.title"></title>
<!--web-->
<meta name="application-name" content="{{$root.site.name}}">
<meta name="description" content="{{$root.page.description}}">
<!--facebook-->
<meta property="og:type" content="website">
<meta property="og:title" content="{{$root.page.title}}">
<meta property="og:url" content="{{$root.site.url}}">
<meta property="og:image" content="{{$root.site.url}}/framework/img/brand/facebook.jpg">
<meta property="og:description" content="{{$root.page.description}}">
<!--twitter-->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{$root.page.title}}">
<meta name="twitter:url" content="{{$root.site.url}}">
<meta name="twitter:image" content="{{$root.site.url}}/framework/img/brand/social.jpg">
<meta name="twitter:description" content="{{$root.page.description}}">
<!--routing-->
<base href="/">
<meta name="fragment" content="!">
出于 SEO 的目的,我将我的应用程序设置为识别带有转义片段的请求 ?_escaped_fragment_=
。当这些请求通过时,它会提供页面的预呈现版本。
是否每个搜索机器人都使用转义片段?例如,如果我 post a link 到我在 Facebook 上的 SPA 页面,它会获取该页面的预渲染版本还是未渲染版本?
Facebook 应该希望转到该页面,查看片段元标记并了解它是一个 ajax 应用程序,然后重新访问包含转义片段的页面以接收预呈现的内容。
所以看起来对 Crawlable Ajax 规范的支持是不完整的。有些搜索机器人支持它,有些则不支持。
- Google: Yes
- Bing: Yes
- Yandex: Yes
- Facebook (open graph reading bot): Only for hashbang URLs
- Twitter Cards bot: No
- Google+ bot: Yes
- LinkedIn bot: No
(以上由罗伯特·邓恩在评论中总结:http://builtvisible.com/javascript-framework-seo/)
可以在此处找到更详细的 post 解释:
http://blog.ajaxsnapshots.com/2013/11/googles-crawlable-ajax-specification.html
幸运的是,有一些方法可以检测不支持 CAS 的搜索机器人并强制 ?escaped_fragment_=
进入 url 以将它们定向到填充了元标记的快照(预渲染)页面有内容!
可以在此处找到执行此操作的各种配置的说明:
https://ajaxsnapshots.com/configGuide
我建立了一个 Angular SPA。我的一些 head
代码如下所示:
<!--title-->
<title ng-bind="$root.title"></title>
<!--web-->
<meta name="application-name" content="{{$root.site.name}}">
<meta name="description" content="{{$root.page.description}}">
<!--facebook-->
<meta property="og:type" content="website">
<meta property="og:title" content="{{$root.page.title}}">
<meta property="og:url" content="{{$root.site.url}}">
<meta property="og:image" content="{{$root.site.url}}/framework/img/brand/facebook.jpg">
<meta property="og:description" content="{{$root.page.description}}">
<!--twitter-->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{$root.page.title}}">
<meta name="twitter:url" content="{{$root.site.url}}">
<meta name="twitter:image" content="{{$root.site.url}}/framework/img/brand/social.jpg">
<meta name="twitter:description" content="{{$root.page.description}}">
<!--routing-->
<base href="/">
<meta name="fragment" content="!">
出于 SEO 的目的,我将我的应用程序设置为识别带有转义片段的请求 ?_escaped_fragment_=
。当这些请求通过时,它会提供页面的预呈现版本。
是否每个搜索机器人都使用转义片段?例如,如果我 post a link 到我在 Facebook 上的 SPA 页面,它会获取该页面的预渲染版本还是未渲染版本?
Facebook 应该希望转到该页面,查看片段元标记并了解它是一个 ajax 应用程序,然后重新访问包含转义片段的页面以接收预呈现的内容。
所以看起来对 Crawlable Ajax 规范的支持是不完整的。有些搜索机器人支持它,有些则不支持。
- Google: Yes
- Bing: Yes
- Yandex: Yes
- Facebook (open graph reading bot): Only for hashbang URLs
- Twitter Cards bot: No
- Google+ bot: Yes
- LinkedIn bot: No
(以上由罗伯特·邓恩在评论中总结:http://builtvisible.com/javascript-framework-seo/)
可以在此处找到更详细的 post 解释:
http://blog.ajaxsnapshots.com/2013/11/googles-crawlable-ajax-specification.html
幸运的是,有一些方法可以检测不支持 CAS 的搜索机器人并强制 ?escaped_fragment_=
进入 url 以将它们定向到填充了元标记的快照(预渲染)页面有内容!
可以在此处找到执行此操作的各种配置的说明: https://ajaxsnapshots.com/configGuide