UA string.

Dirk Mueller mueller at kde.org
Fri Feb 21 01:06:36 GMT 2003


On Don, 20 Feb 2003, Darin Adler wrote:

> >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.

Yes, but you're the only browser that does this AFAIK. Not good. I think 
I've seen code that looks up for the first '(' and the last ')' and then split 
the rest with ";" as delimiter, your UA string might break here. 

> Might be OK. We the key is that they can just look for the substring 
> KHTML.

Right, and they see Gecko if they don't know KHTML. and they see 
Mozilla/5.0 (some use the 5 as switching between total-legacy and 
reasonable-new). What we want to totally avoid is being detected as 
Netscape 6.x, because a lot of rather important sites simply block this 
browser. 

> >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.

though if they look for "(compatible" they find that as well. 

I know that we can render better CSS-based webpages, but if a website 
doesn't provide such a variant, being detected as MS IE is the best thing 
that can happen. In fact, many Konqueror users prefer Konqueror over Mozilla 
is because it allows them to browse rather IE centric web sites more or less 
flawlessly, compared to Mozilla. We support document.all for example, and 
prefer that much over document.layers (though NS4 support is disappearing so 
fast nowadays from the web its not such a big issue 2003 any as it was in 
2000 when we decided for the MSIE road). Still, JS menus which detect us as 
Gecko unfortunately soon use some Mozilla specific totally nonstandard 
inventions. 

> >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.

I remember code that was looking after the ')' bracket for it. but I don't 
remember if they looked for the first ')' or the last ')'. As afaik there is 
no browser with more than one ')' web authors might not have put much 
thought in this. 

> >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.

Not in all cases of course. Being detected as MSIE is much better if the 
other alternative is NS4 (or Lynx, or whatever). Also, some webpages simply 
deny you everything if they don't see a "compatible". I guess this is a case 
for spoofing of course. maybe its more correct to be not "compatible" by 
default. I tend to agree more and more to that, because I see that Mozilla 
is indeed gaining ground nowadays. However I still see MSIE as dominating 
browser in the near and middle future, and we have to support its quirks as 
far as possible anyway, for all the sites that are simply designed for IE 
and nothing else. I was impressed by the positive reactions upon your 
decision of including "Gecko" in the Safari UA string. 

Maybe we should just come up with yet another substring that is common to 
Mozilla, Safari and Konqueror. Something like "W3C", or "CSS" or "DOM" (fill 
in better suggestions here). Then we could have W3C/Gecko and W3C/KHTML. 
Though Mozilla might not be willing to change their user agent string at all 
anymore. In fact, the "hasFeature" proposal of DOM is better anyway. 

How are we going to tackle this in the navigator.* Javascript properties?

> 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.

Good. We should give the common Konqueror/Safari UA substring a good PR. 

.. waiting for other insights ..


-- 
Dirk (received 108 mails today)




More information about the kfm-devel mailing list