如何搜索引擎处理AngularJS应用程序? [英] How do search engines deal with AngularJS applications?

查看:126
本文介绍了如何搜索引擎处理AngularJS应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有关搜索引擎和搜索引擎优化的两个问题与AngularJS应用程序:

I see two issues with AngularJS application regarding search engines and SEO:

1),自定义标签会发生什么?难道搜索引擎忽略那些标记内的全部内容?即假设我有

1) What happens with custom tags? Do search engines ignore the whole content within those tags? i.e. suppose I have

<custom>
  <h1>Hey, this title is important</h1>
</custom>

&LT; H1&GT;尽管是自定义标签内索引

结果

2)是否有办法避免索引搜索引擎{{}}字面上具约束力?即。

2) Is there a way to avoid search engines of indexing {{}} binds literally? i.e.

<h2>{{title}}</h2>

我知道我可以做这样的事情。

I know I could do something like

<h2 ng-bind="title"></h2>

但如果我想真正让爬虫看的称号?是服务器端呈现唯一的解决办法?

but what if I want to actually let the crawler "see" the title? Is server-side rendering the only solution?

推荐答案

如果你想优化你的应用程序的搜索引擎不幸的是没有办法解决供应pre-渲染的版本的履带。你可以阅读更多有关谷歌的建议,这里 Ajax和JavaScript重的网站

If you want to optimize your app for search engines there is unfortunately no way around serving a pre-rendered version to the crawler. You can read more about Google's recommendations for ajax and javascript-heavy sites here.

如果这是我建议你阅读这篇文章有关如何选项对角与服务器端渲染做SEO。

If this is an option I'd recommend reading this article about how to do SEO for Angular with server-side rendering.

我不知道,当它遇到自定义标签履带做什么。

I’m not sure what the crawler does when it encounters custom tags.

更新2014年5月

谷歌爬虫现在执行JavaScript - 您可以使用的谷歌网站管理员工具更好地了解您的网站是如何通过谷歌提供的。

Google crawlers now executes javascript - you can use the Google Webmaster Tools to better understand how your sites are rendered by Google.

这篇关于如何搜索引擎处理AngularJS应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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