54

I was wondering what are the possible user.agent values in gwt.xml. I found some of them but unfortunately not the complete list.

  • Chrome - safari
  • Firefox - gecko1_8
  • Internet Explorer 6 - ie6

What are the others?? Opera, ie7, ie8, ... etc.

Kayser
  • 6,544
  • 19
  • 53
  • 86

1 Answers1

64

Depends on the version of GWT, but here's the latest definition. (Recently all IE9 / IE10 has been removed)

UPDATE: the module has moved from com.google.gwt.user.UserAgent to com.google.gwt.useragent.UserAgent, link above updated.

UPDATE 2: GWT sources have moved to gwt.googlesource.com

Update 3: GWT sources have moved to github.com, link updated.

Lonzak
  • 9,334
  • 5
  • 57
  • 88
Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • 1
    The list of supported `user.agent` property values was removed from [the latest version of UserAgent.gwt.xml](http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml), that is opened with your link. Now it can be found in [the r9835 version of that file](http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml?r=9835). – MockerTim Mar 16 '12 at 09:37
  • 1
    It has actually been moved to [`com.google.gwt.useragent.UserAgent`](http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/useragent/UserAgent.gwt.xml) (and the `com.google.gwt.user.UserAgent` module is only kept for backwards compatibility) – Thomas Broyer Mar 16 '12 at 10:06
  • 1
    And the correspondence between `user.agent` codes and browsers? How can I know which one corresponds to, for example, Google Chrome. – Jaime Hablutzel May 25 '15 at 22:42
  • Found it, here are the "user.agent" codes and the JS used to identify which one will be used for a given browser. – Jaime Hablutzel May 25 '15 at 23:01
  • [Source on GitHub](https://github.com/gwtproject/gwt/blob/master/user/src/com/google/gwt/useragent/UserAgent.gwt.xml) – MrStahlfelge Jan 24 '19 at 08:23