Google抓取工具不会翻译#!到ajax应用程序中的_escaped_fragment_ mapping

时间:2014-03-06 15:09:45

标签: ajax google-plus single-page-application google-webmaster-tools google-crawlers

我有一个单页应用程序应该使用#!(哈希爆炸)进行导航。我现在阅读了Making AJAX Applications Crawlable上的Google规范。如何测试我的应用程序是否以所需方式工作?

我在google plus debugger中输入了我的申请,例如http://www.mysite.org/de#!foo=bar。但是,apache的访问日志告诉我谷歌抓取工具然后没有将#!翻译为_escaped_fragment_,因此谷歌调试器仍然检索/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" ...

1 个答案:

答案 0 :(得分:0)

据我所知,_escaped_fragment_ =最后为=。 你尝试过:

<meta name="fragment" content="!" />
你的HTML头上有

吗?