Angularjs vs SEO vs pushState [英] Angularjs vs SEO vs pushState

查看:18
本文介绍了Angularjs vs SEO vs pushState的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读此线程后,我决定使用pushstateapi 在我的 angularjs 应用程序中完全基于 API(独立的前端和独立的后端).

这是我的测试站点:http://huyaks.com/index.html

我创建了一个站点地图并上传到谷歌网站管理员工具.

据我所知:

google 索引了主页,索引了动态导航(很酷!)但没有索引任何动态网址.请看看.

我检查了相关主题中给出的示例站点:

http://html5.gingerhost.com/london

据我所知,当我直接访问特定页面时,假定为动态的内容由服务器返回,因此已编入索引.但在我的情况下这是不可能的,因为我的应用程序是完全动态的.

能否请您提出建议,在我的特定情况下有什么问题以及如何解决?

提前致谢.

注意:这个问题是关于 pushState 方式的.请不要建议我使用转义片段或像 prerender.io 这样的 3-d 派对服务.我想弄清楚如何使用这种方法.

解决方案

显然 Quentin 没有阅读您所指的帖子.http://html5.gingerhost.com/london重点是它使用 pushState 并证明它不需要为了蜘蛛的利益而需要静态 html.

<块引用>

本网站使用 HTML5 wizrdry [原文如此] 将‘实际内容’异步 [原文如此] 加载到代码的其余部分:这让用户更快,但它仍然可以被搜索引擎完全索引."

撇开乱七八糟的拼写不谈,这个演示表明异步加载的内容是可索引的.

After reading this thread I decided to use pushstate api in my angularjs application which is fully API-based (independent frontend and independent backend).

Here is my test site: http://huyaks.com/index.html

I created a sitemap and uploaded to google webmaster tools.

From what I can see:

google indexed the main page, indexed the dynamic navigation (cool!) but did not index any of dynamic urls. Please take a look.

I examined the example site given in the related thread:

http://html5.gingerhost.com/london

As far as I can see, when I directly access a particular page the content which is presumed to be dynamic is returned by the server therefore it's indexed. But it's impossible in my case since my application is fully dynamic.

Could you, please, advise, what's the problem in my particular case and how to fix it?

Thanks in advance.

Note: this question is about pushState way. Please do not advise me to use escaped fragment or 3-d party services like prerender.io. I'd like to figure out how to use this approach.

解决方案

Evidently Quentin didn't read the post you're referring to. The whole point of http://html5.gingerhost.com/london is that it uses pushState and proves that it doesn't require static html for the benefit of spiders.

"This site uses HTML5 wizrdry [sic] to load the 'actual content' asynchronusly [sic] to the rest of the code: this makes it faster for users, but it's still totally indexable by search engines."

Dodgy orthography aside, this demo shows that asynchronously-loaded content is indexable.

这篇关于Angularjs vs SEO vs pushState的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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