Wednesday, September 1, 2010

Re: user.agent options

On Sep 1, 10:10 pm, John Denley <johnvden...@googlemail.com> wrote:
> Thanks for this sbraheem.
>
> For anyone else reading this who doesnt know how to access what sbraheem is
> talking about (as I didnt) then just search your hard drive for the
> gwt-user.jar file then simply copy it and rename it to gwt-user.jar.zip and
> then open it with any zip browser and you can navigate down to
> 'com/google/gwt/user/UserAgent.gwt.xml' as stated by sbraheem.

Or you could just "navigate" the JAR from within your IDE (i.e.
Eclipse)

> For me (version 2.04) the available options are
>
> ie6,ie8,gecko,gecko1_8,safari,opera
>
> which is interesting because - whats happened to ie7? is it really not
> supported? The answer is of course "NO" the ie6 option covers ie7 (but I had
> to look at the code inside the XML file to find that out!) - Surely these
> things should be part of the standard documentation somewhere shouldn't
> they?

Yes, probably.

And to makes things clear: ie8 only means "IE 8 in SuperStandards
mode". And IE 9 will require a new user.agent value (which is actually
fortunate, because it will share more code than before with the other
permutations; standards compliance FTW!)

> Also, this still doesn't answer the second part of the question, which is
> what do these mean? or to put it another way "where are chrome and firefox?"

You have to "reverse engineer" the associated <property-provider
name="user.agent">

> The following website does help a bit*
> *http://www.useragentstring.com
>
> and this is what seems like a very comprehensive list of mobile phone
> user-agents:http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones
>
> but gecko1_8 didnt seem to be FULLY mentioned anywhere, however looking
> at http://www.useragentstring.com
>
> I found that gecko1_8 seems to be Firefox prior to V2.1, and gecko
> (presumably inferring v1.9) is for FF2.1 and above (although I notice that
> FF4.0b3pre and FF4.0b4 are gecko v2.0)

Actually, no.
user.agent=gecko is gecko 1.7.something, which is something like
Firefox 1.0, and was used in HostedMode (i.e. before GWT 2.0 and its
in-browser DevMode). I believe it should have been removed since then,
but I suppose no one actually took the time to nuke it (and all
associated Java files, cleaning up class hierarchies when needed)
user.agent=gecko1_8 applies to both Gecko 1.8 and 1.9, i.e. every
Firefox version out there.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment