我有一个单页应用程序,应该使用#!
(哈希爆炸)进行导航。我现在阅读了 Google 关于使 AJAX 应用程序可抓取的规范。如何测试我的应用程序是否以所需的方式工作?
我在google plus 调试器中输入了我的应用程序,例如http://www.mysite.org/de#!foo=bar。但是,apache 的访问日志告诉我 google 爬虫不会转换#!
为_escaped_fragment_
,因此 google 调试器仍然/de
在没有哈希爆炸的情况下检索:
66.249.81.165 - - [06/Mar/2014:15:54:06 +0100] "GET /de HTTP/1.1" 200 177381 "Mozilla/5.0 (compatible; X11; Linux x86_64; Google-StructuredDataTestingTool; +http://www.google.com/webmasters/tools/richsnippets)"
(注意:仍然GET /de
没有 _escaped_fragment_ hash
片段)。我希望谷歌能检索到这样的东西:
... "GET /de?_escaped_fragment_ mapping HTTP/1.1" ...