GWT Ajax crawling : ?_escaped_fragment_=subpage | subpage is ignored
I successfully made my gwt app crawlable following the official Google
guide at https://developers.google.com/webmasters/ajax-crawling/
Now, I got a startpage that is invoked with the historytoken #!
Startpage and I got a contact form that is invoked by #!Contact.
Here is my on module load function:
public void onModuleLoad() {
// I commented this so that I get an empty inital window
//RootPanel.get("application_div").add( new StartWidget() );
//do some stuff and add history support
History.newItem( History.getToken() );
}
Now, if I call my page like this
I get an empty page, as expected! But when calling the page like this
http://localhost:8080#!Startpage
I get the startpage. And with
http://localhost:8080/#!Contact
I get the contact form. So I checked that this works.
Now to the crawling part:
I installed a servlet filter in my tomcat and use this code
as the filter object. It uses htmlunit to render the page on server
side and then it sends pure html to the client. This works as follows:
http://localhost:8080/?_escaped_fragment_=Contact
The _escaped_fragment_ invokes the htmlunit part in the filter object
and the page gets rendered as described in the offical Google guide
ajax crawling document: https://developers.google.com/webmasters/ajax-crawling/
The problem is that
http://localhost:8080/?_escaped_fragment_=Contact
yields a empty page just as if there was no history token. This means
that the htmlunit in the code completly ignores the history token and
just loads an empty page.
What is going wrong and why does htmlunit not invoke the history?
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home