看完这篇thread 我决定在完全基于 API(独立前端和独立后端)的 angularjs 应用程序中使用 pushstate api。
这是我的测试站点:http://huyaks.com/index.html
我创建了站点地图并上传到谷歌网站管理员工具。
据我所知:
google 索引了主页,索引了动态导航(酷!)但没有索引 任何动态网址。 请take a look.
我检查了相关线程中给出的示例站点:
http://html5.gingerhost.com/london
据我所知,当我直接访问特定页面时,假定为动态的内容由服务器返回,因此它被编入索引。但这对我来说是不可能的,因为我的应用程序是完全动态的。
请问我的具体情况有什么问题以及如何解决?
提前致谢。
注意:这个问题是关于 pushState 方式的。请不要建议我使用转义片段或 3-d 派对服务,如 prerender.io。我想弄清楚如何使用这种方法。
最佳答案
显然 Quentin 没有阅读您所指的帖子。 http://html5.gingerhost.com/london 的整点是它使用 pushState 并证明它不需要为了蜘蛛的利益而需要静态 html。
"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."
抛开狡猾的正字法不谈,这个演示表明异步加载的内容是可索引的。
关于javascript - Angularjs 与 SEO 与 pushState,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26200740/