[opencms-dev] Opera user agent detection

Hallvord Reiar Michaelsen Steen operatester at hallvord.com
Tue Dec 21 22:44:35 CET 2004


I'm writing on behalf of Opera Software to ask you whether the 
visitor statistics module of OpenCMS correctly detects the Opera 
browser. If your product generates browser usage statistics and you 
are not aware of Opera's user agent spoofing you may not report 
correct statistics over visiting browsers.

Please see the following article for more detailed information:
http://www.opera.com/support/search/supsearch.dml?index=570

Opera never completely hides its identity when spoofing another 
browser. 
This is a feature, not a bug. There are two main reasons for this:

1) If Opera completely hid its identity, it would not appear in any 
server 
logs or statistics over browser usage. No webmasters would ever 
bother 
testing their sites with it, assuming that nobody used it.

2) When you can detect an Opera-using visitor by looking specifically 
for 
the "Opera" string in the UserAgent header/property you can serve 
Opera - 
adapted pages. If you are aware of Opera's standards-compliance, for 
instance, you can detect Opera and serve a standards-compliant page 
even if 
Opera identifies as MSIE and would normally get IE-specific code.

A historical curiosity: there is hardly any browser out there that 
really reports its identity. IE spoofs Netscape because Netscape was 
the first browser to implement certain HTML features in the early 
days of the web, and webmasters started blocking other browsers. That 
is why the UserAgent string gets so complicated - Opera is spoofing 
IE which is spoofing Netscape (which used to call itself Mozilla...), 
so there is version and name-information of three different browsers 
in the string...
-- 
Hallvord Reiar Michaelsen Steen
http://www.hallvord.com/
-- 
Hallvord R. M. Steen
34 Quai Jayr, Lyon 9eme, France
04 72 85 92 14 / 06 84 11 96 13




More information about the opencms-dev mailing list