Crawling an ajax based page with both a hash fragment and a meta tag
Posted
by
Christofian
on Pro Webmasters
See other posts from Pro Webmasters
or by Christofian
Published on 2012-10-07T19:17:14Z
Indexed on
2012/10/07
21:55 UTC
Read the original article
Hit count: 411
According to google's documentation on crawling ajax based web pages, if a url contains a hash fragment, or something at the end of an url that looks like #helloworld
, and if there is an !
after the #
, as in #!helloworld
, google will then request the url url?_escaped_fragment_=helloworld
.
I currently have an ajax based webpage that I want google to be able to crawl. Sometimes, the page uses hash fragments, and for those situations I set up the server so it will return an html snapshot for that page using _escaped_fragment_
.
However, that webpage often does not load a hash fragment, and when that happens the webpage still loads content using ajax.
I couldn't find a good solution to enable ajax crawling for pages that sometimes have a hash fragment and sometimes don't. How can I tell google to use _escaped_fragment_
when there is a hash fragment, and to use something else to get an html snapshot of a page when there isn't a hash fragment?
© Pro Webmasters or respective owner