0

我有一个单页应用程序,应该使用#!(哈希爆炸)进行导航。我现在阅读了 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" ...
4

1 回答 1

0

据我所知, _escaped_fragment_= 以 = 结尾。您是否尝试过:

<meta name="fragment" content="!" />

在你的 HTML 头上?

于 2014-05-15T17:58:48.953 回答