Does anyone know of a definitive list of GWT's user.agent properties and the targeted browsers? I'll be damned if I can find such a thing anywhere on the web!
Asked
Active
Viewed 2.0k times
15
-
2possible duplicate of [What are the possible user.agent values in gwt.xml](http://stackoverflow.com/questions/7992678/what-are-the-possible-user-agent-values-in-gwt-xml) The corresponding browsers seem self-explanatory to me (OK, safari also means chrome and now opera 14+) – Thomas Broyer Apr 16 '13 at 23:15
2 Answers
22
Latest gwt "user.agent" property values can be found in UserAgent.gwt.xml file:
<define-property name="user.agent" values="ie6" /> <!-- ie6 also matches ie7-->
<extend-property name="user.agent" values="ie8" />
<extend-property name="user.agent" values="gecko1_8" /> <!-- Firefox 3.0+ -->
<extend-property name="user.agent" values="safari" /> <!-- Webkit based browsers, usually Safari&Chrome-->
<extend-property name="user.agent" values="opera" />
<extend-property name="user.agent" values="ie9" fallback-value="ie8" />
Code which resolves property values can be found at class com.google.gwt.useragent.rebind.UserAgentPropertyGenerator
But this values vary from version to version, also sometimes default values and property provider can be overridden.

Hilbrand Bouwkamp
- 13,509
- 1
- 45
- 52

jusio
- 9,850
- 1
- 42
- 57
-
1`gecko1_8` is actually Firefox 1.5+ http://en.wikipedia.org/wiki/Gecko_(layout_engine) but GWT doesn't _officially_ support such old Firefox versions. Also, `safari` should also match Blink for now, which means Chrome and Opera 14+ (beta) now that they switched to Chromium. Oh and `ie9` also matches IE10, but that goes without saying right? – Thomas Broyer Apr 16 '13 at 23:17
-
Speculating Chrome/Opera might probably move towards a new user agent for blink this year - https://plus.google.com/+GoogleChromeDevelopers/posts/faJ8BmaQL8j – appbootup Apr 17 '13 at 03:43
8
Well, I don't have enough reputation to comment on the existing answer, so here's another answer instead! This is just to note that the codebase has moved, and that the GWT source file which contains this information has now moved. The new location is: https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/useragent/UserAgent.gwt.xml
At the time of writing, the list is:
<define-property name="user.agent" values="ie8" />
<extend-property name="user.agent" values="gecko1_8" />
<extend-property name="user.agent" values="safari" />
<extend-property name="user.agent" values="ie9" fallback-value="ie8" />
<extend-property name="user.agent" values="ie10" />

William Gallafent
- 119
- 1
- 2