Thursday, May 15, 2014

Re: Can you tell me Step-By-Step Guidelines of How to use HtmlUnit to make GWT app Crawlable?

about this ex https://groups.google.com/forum/#!topic/google-web-toolkit/Syi04ArKl4k
so Google use server-side technology to create Html snapshot? or they use HtmlUnit?



On Friday, May 16, 2014 12:06:24 AM UTC+10, Jens wrote:
HtmlUnit is bundles as jar file so you can put it (and all its dependencies) into WEB-INF/lib of your war.

Then you need to write a servlet that takes the server request of the Google bot, rewrites the _escaped_fragment_ parameter back to the original #!<token> url and starts HtmlUnit with that url. The resulting/rendered page will then be returned by the servlet.

At the bottom is an example:



The rendered page that you serve the Google Bot does not have to be a 1:1 copy of your original page. It is enough if the same content is available, styling is irrelevant. For example compare:



-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment