admin管理员组文章数量:1415453
I have Backbone website. I've used phantomjs so that search engines can look up though the js links (#!/something), following the _escaped_fragment_spec. I've checked using google webtools, to see how google will look my site, and mostly everything seems correct.
However, the main page (ex: www.example; the one with no #! in the link), google does not send the _escaped_fragment_spec, so the page is not sent to phantomjs, and js are not applied, therefore google is looking to a nearly empty page.
Does anyone knows how to indicate this, or solve the problem?
Thanks
Edit: According to google () You should add to head, however I've added it, and webtools - see as google, does not seam to be procesing the main page as javascript. Any help? The site with problems is / Thanks
I have Backbone website. I've used phantomjs so that search engines can look up though the js links (#!/something), following the _escaped_fragment_spec. I've checked using google webtools, to see how google will look my site, and mostly everything seems correct.
However, the main page (ex: www.example.; the one with no #! in the link), google does not send the _escaped_fragment_spec, so the page is not sent to phantomjs, and js are not applied, therefore google is looking to a nearly empty page.
Does anyone knows how to indicate this, or solve the problem?
Thanks
Edit: According to google (https://developers.google./webmasters/ajax-crawling/docs/getting-started) You should add to head, however I've added it, and webtools - see as google, does not seam to be procesing the main page as javascript. Any help? The site with problems is http://www.boletus-app./ Thanks
Share Improve this question edited Jun 5, 2012 at 15:55 Mateu asked May 30, 2012 at 9:39 MateuMateu 2,6986 gold badges38 silver badges56 bronze badges 1- did you add in anything to your .htaccess to redirect to an 'seo server' or sub-domain, or did you handle in the escaped_fragment query parameter in the application itself? – Leonidas Commented Apr 25, 2013 at 18:57
2 Answers
Reset to default 7The answer to this question was to use the fragment meta tag
<meta name="fragment" content="!">
This will force all pages including the home page to be requested with escaped fragments
The query parameter is named "_escaped_fragment", not "_escaped_fragment_spec".
Google will not execute the JavaScript in your client app. Google's AJAX application support is meant to support situations where AJAX/hashbang URLs from your site are linked to from other sites. For example, if someone links to http://example./app#!my-route
, when Google's crawler encounters that link, it will translate it to http://example./app?_escaped_fragment=my-route
before requesting it from your server. Your server code must handle this query parameter and generate the appropriate HTML to represent that URL for Google to index.
本文标签:
版权声明:本文标题:javascript - SEO in a backbone application so that google can index home, after phantomjs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745148132a2644791.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论