I've just opened https://gwt-review.googlesource.com/7780 to make it possible to specify a fallback for any/all useragents that don't match one of the built-in rules, via a rule like:
<set-property-fallback name="user.agent" value="webkit"/> This example rule treats any unknown useragent as if it were webkit, rather than the non-existent 'unknown' useragent, which subsequently tries to load undefined.cache.html, etc. This could also be used in conjunction with defining a user.agent value for unknown browsers and falling back to an existing one (like Thomas suggested), along with a possible error message, but that runs the risk of failing to match any CssResource @if rules, for example. This will of course create a huge amount of warnings in your application "Could not find an exact match rule. Using 'closest' rule..." when attempt to rebind things that cannot be matched to unknown and fall back to gecko1_8, etc. <!-- Create new value, try and use ff details for it (most of the time) --> <extend-property name="user.agent" values="unknown" fallback-value="gecko1_8" /> <!-- this line is not actually necessary unless you want to use a string other than 'unknown', and won't work before the above patch --> <set-property-fallback name="user.agent" value="unknown"/> <!-- 'most of the time' we want ff, except for a warning when the page boots. --> <!-- To achieve that, we create a second entrypoint that extends the real one, but also displays a warning about this browser being unsupported --> <replace-with class="pack.age.to.client.UnknownBrowserEntryPoint"> <when-type-is class="pack.age.to.client.RealAppEntryPoint" /> </replace-with> Thomas, were you suggesting a filter in GWT itself to let the server do this, or to have an 'UnknownUserAgentEntryPoint' built into GWT itself? On Saturday, May 10, 2014 5:27:37 PM UTC-5, Thomas Broyer wrote ...snip... > That said, Google Groups and Google Flight Search fallback to the gecko1_8 > permutation in Opera 12 (with a warning message that it might break), so we > should probably make it possible at least (Google uses a server-side > selection script based on the User-Agent request header, rather than the > *.nocache.js using navigator.userAgent on the client-side) > Would you mind opening an issue about it? > Maybe there's a workaround though: it might be as easy as defining a > "unknown" (the value returned by the property generator) value for the > "user.agent" property that falls back to gecko1_8 (just like ie9 falls back > to ie8): i.e. <extend-property name="user.agent" values="unknown" > fallback-value="gecko1_8" />; and then you could use deferred-binding > specifically for that "unknown" value to display a warning message, and you > could collapse "unknown" and "gecko1_8" values into the same permutation. > Worth a try IMO if you care about it. > > On Friday, May 9, 2014 8:14:55 PM UTC+2, Robert J. Carr wrote: >> >> This just burned me. Just curious why you couldn't have it load the file >> from firefox or webkit instead of just doing nothing? Better to deal with >> potential errors than to be a total non-starter. >>> >>> -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/de99d642-710b-44c9-8439-11a108d8e840%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.