weixin_33717298 2014-08-22 06:08 采纳率: 0%
浏览 39

Google Ajax内容索引

I've followed the instructions from the Google website to enable Ajax crawling on my AngularJS site by adding the following meta tag:

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

The rendered content has some links like:

<a href="/user/1">User 1</a>
<a href="/user/2">User 2</a>
<a href="/user/3">User 3</a>

Also some Ajax tabs which render dynamic content like:

<a href="#!/popular">Popular</a>
<a href="#!/recent">Recent</a>

Looking at the server logs, GoogleBot did came and passed in correctly the _escaped_fragement in the Uri, which is correct:

_escaped_fragment_=%2fpopular
_escaped_fragment_=%2frecent

Problem is that looking at actual indexed content using site:www.somesite.com and logs on server, I see that GoogleBot attempted to index pages like:

/user/1/#!/popular
/user/1/#!/recent

Why would something like this happen considering those urls are relative and don't have #! on them to indicate ajax content and is there a way to prevent this?

  • 写回答

1条回答 默认 最新

  • weixin_33709590 2014-12-06 21:15
    关注

    If those URLs are available on all pages, it will simply add them.

    So, if I would go to: <a href="/user/1">User 1</a> and there are again <a href="#!/popular">Popular</a> there pages, then it's logical that Google loads: /user/1#!/popular

    You might want to know that I've solved this puzzle with a script that's on Github: https://github.com/kubrickology/Logical-escaped_fragment

    Simply build your AJAX pages with: __init()

    评论

报告相同问题?