Friday, September 30, 2016

GWT google crawler error undefined.cache.js


I have a GWT application http://islamart.tn which fails on google crawling : The 'fetch as google' feature fails with a 'partial' status saying that it can't find undefined.cache.js

After some research, I found that this js is the app js when the user.agent is not recognized

I therefore changed my

UserAgentPropertyGenerator.UserAgent

enum value for gecko to recgnize google bot:

 gecko1_8("return (ua.indexOf('Googlebot') || ua.indexOf('gecko') != -1 || docMode >= 11);");  

In my core GWT module I naturally added the line :

<property-provider name="user.agent" generator="fr.onevu.vume.client.common.UserAgentPropertyGenerator"/>  

I installed 'Chrome UA spoofer" to emulate the Googlebot user.agent request, and what happened is that now I have a warning at startup saying that the runtime value safari is different than the compile time gecko_18

I still see some checking runtime code in the generated js

{$stackDepth_0=stackIndex_0-1;return 'gecko1_8'}$stackDepth_0=stackIndex_0-1;return 'unknown'}  

but those files are very large, and I don't know from which classes they are generated.

Additionally, I had to fall back to the version 2.6.1 since compilation with 2.8.0RC2 and 2.7.0 don't finish the job (for some reasons I don't have the time to investigate now)

Any ideas please?...

I need an answer to one of these questions :

  • How to personalize the runtime user agent check generated code ?
  • How to make googlebot use the gecko_18 version of my app ? 

p.s : I posted this message on http://stackoverflow.com/questions/39796166/gwt-application-crawler-error-undefined-cache-js

--
You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment