UA string.

Dawit A. adawit at kde.org
Fri Feb 21 02:03:23 GMT 2003


On Thursday 20 February 2003 19:33, Darin Adler wrote:
> On Thursday, February 20, 2003, at 04:05 PM, Dirk Mueller wrote:
> > On Don, 20 Feb 2003, Darin Adler wrote:
> >> Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/60 (KHTML,
> >> like Gecko) Safari/60
> >
> > hmm, the second pair of brackets is not going to be a problem for some
> > websites?
>
> We've always had those two sets of parentheses.
>
> > I guess we should change our to
> >
> > Mozilla/5.0 (compatible; Konqueror/3.1; KHTML, like Gecko; Linux)
> >
> > But thats not really compatible to your format.
>
> Might be OK. We the key is that they can just look for the substring
> KHTML.

This will break all the sites that are currently looking for 
konqueror/major.minor, however small in number they may be :(

> > Mozilla/5.0 (compatible; Konqueror/3.1; Linux) (KHTML, like Gecko)
>
> Seems as good as the above, not a lot better though. I guess they can
> look for "(KHTML," in this one, which might be better.

And keeps compatibility with what some sites are already looking for.

> > Is there any spec on UserAgent string formatting?
>
> I wish there was. There are some documents at mozilla.org, but that's
> all I could find.

This is part of the HTTP specification (RFC 2616 section 14.43).  However, 
that is as vague as any description can be.  It almost says, put whatever you 
want.  The other one is what Mozilla currently uses and that is outlined 
here: http://www.mozilla.org/build/revised-user-agent-strings.html.

> > Though this clashes with websites that treat "compatible" as MSIE,
>
> Right, that's why we use the word "like" instead of "compatible".
>
> > and expect "Gecko" after the closing brackets to detect it as Gecko.
>
> We did that on purpose, of course. Many pages don't give modern
> standards-compliant content unless they see the substring Gecko
> somewhere, but they don't care where.
>
> > Mozilla/5.0 (compatible; U; Linux; en-us) KHTML/3.1 like Gecko
>
> That's more like us, but has the problem that "compatible" is going to
> make many simple-minded sites think you are IE; we found that led to
> bad results.

Ironic.  IIRC IE used the word "compatible" to indicate that it was compatible 
with "Mozilla" since it choose to use that word to start its user-agent 
string when it should have known better.  Knowing them more as a ploy for 
more market share I am sure. Now "compatible" is associated with IE ? Oh 
well. A correct expression for us would have been:

Konqueror/major.minor (Linux 2.4.19; en-us; X11) like Gecko
KHTML/major.minor (Linux; en-us; X11) like Gecko

But since that would break many sites:

Mozilla/5.0 (compatible; konqueror/major.minor) KHTML/3.1 like Gecko

is the best choice we have IMHO.

> > BTW, do you happen to know the meaning of the "U;" ? :-)
> I do not. I am preparing a document explaining our user agent string
> that might some day go up on developer.apple.com, and that's one of the
> unanswered questions in my current draft.

U means strong security.  It along with I - weak security and N - no security 
are meant to describe how strong the crypto module you choose to install in 
Netscape was.  I see it has been carried over to Mozilla as well (See the 
above link).  However, I have not seen any other major browser use this 
classification to describe strong security. Most webservers do actually 
preform the SSL handshake in order to determine the level (SSLv2/ SSLv3) and 
strength of the cipher you are using (128-bit key).  So for the most part and 
IMHO this is a useless feature specific to Netscape. I could be wrong about 
its usefullness of course...

Regards,
Dawit A.




More information about the kfm-devel mailing list