The technique of detecting an operating system from a User Agent
string is far from an exact science, in fact, here are a selection of
the User Agents that have browsed sites on my server recently:
- Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)
- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1)
- Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
.NET CLR 1.1.4322; .NET CLR 1.0.3705)
- Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us)
- AppleWebKit/51 (like Gecko) Safari/51
- Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
- Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
And that's just six of a potentially unlimited number of variations.
As a human, I can quite easily identify these, as I can comprehend
context, they are:
- Internet Explorer 5.22 on a Mac (OS Version unknown)
- Mozilla 1.2.1 on Windows XP
- Internet Explorere 6.0 on Windows XP
- Safari on Mac OS X
- Mozilla 1.2.1 on Linux on an 686-class processor.
- Lynx (text only browser) on an unknown OS.
However from my perspective as a programmer, I have to look for clues,
and I have to be fairly broad, so I write code that basically does
Does User Agent contain 'linux'?
Yes -> OS is Linux.
No -> Keep trying.
Does User Agent contain 'mac'?
Yes -> OS is Mac OS.
No -> Keep trying.
Does User Agent contain 'windows'?
Yes -> OS is Windows.
No -> I have no idea what the OS is.
The problem in your case is that the iOpus Internet Macros banner in
your User Agent is confusing some of these scripts and causing them to
incorrectly identify your operating system.
An example of the sniffing code in question is available at the MSDN
Assuming the sites you are having problems with are using this code,
or something similar, here is the part you are having problems with:
//IE supported OS's
bWin95 = (ua.indexOf("Windows 95")>=1);
bWin98 = (ua.indexOf("Windows 98")>=1);
bWinNT = (ua.indexOf("Windows NT")>=1);
bWinXP = (ua.indexOf("Windows NT 5.1")>=1);
bWin16 = (ua.indexOf("Windows 3.1")>=1);
bWinME = (ua.indexOf("Windows Me")>=1);
bMac = (ua.indexOf("Mac")>=1);
bMac68K = (ua.indexOf("Mac_68000")>=1);
bMacPPC = (ua.indexOf("Mac_PowerPC")>=1);
bMSSun = (ua.indexOf("SunOS")>=1)
This match will be identifying your system as both Windows 98 and Mac
the problem is then that the site programmers are checking for, and
handling, the Mac clients before the Windows ones, meaning they see
Mac and go with it, before really taking in all the information.
I have checked the FAQ for iOpus Internet Macros and found no mention
of this, however if you like you can email them at firstname.lastname@example.org
or use this form: http://www.iopus.com/service/support.html to provide
feedback to them about the problem you are experiencing.
Short of uninstalling the iOpus software, I am not aware of anything
you can easily do to correct this problem, there is no indication
anywhere in any of the iOpus documentation that it is possible to turn
off this addition to the User Agent setting.
Here are some other similarly flawed examples of OS detection, all of
which will get false positives for Mac with your User Agent:
In this case, the use of 'else if' means that once if finds 'mac' it
In the first example, despite correctly identifying Windows at first,
it will overwrite that setting when it sees the 'mac'.
This code should work for you, as it checks for Windows first, and
once it finds that, it stops looking. However, if you were using a Mac
and had Mac_PowerPC; Magical Windows Plugin in your User Agent, you
would suffer the opposite fate.
I hope this answers the question for you sorry I can't offer a
simple solution that doesn't require uninstalling the iOpus software.
It should be possible, technically, to change the outgoing User Agent
setting, however in reality that option maybe quite problematic.
Request for Answer Clarification by
05 Feb 2003 12:17 PST
I have uninstalled Opera, deleted all cookies, deleted temporary
internet files, and deleted temporary files. I still get recognized as
a Mac user. I'm not a programmer, so some of the links given, although
interesting, did not help solve the problem. What is the name of the
file that servers 'read' on my computer? Can I edit that and delete
the iOpus Macros section? Or just delete it entirely? Thanks for any
Clarification of Answer by
05 Feb 2003 14:50 PST
You uninstalled Opera? Opera is not related to the iOpus plugin.
You can uninstall iOpus plugin from the Add/Remove Programs system by
doing the following:
Start -> Settings -> Control Panels -> Add/Remove Programs
In Add/Remove Programs, select 'iOpus Internet Macros' and click
If you do not want to actually uninstall the Internet Macros software,
you maybe able to get an upgrade. I installed a recent demo version
for testing purposes, and it identifies itself in the following way:
"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; iOpus-I-M)"
Which would not cause the same problems you experience, so it seemd
iOpus may have become aware of the problem in earlier versions and
I am not very familiar with the software in question, so if you want
to use this option, I suggest you email iOpus at the address I
provided in my answer above and investigate the options with them.
As for editing a file - the servers don't read a file. The User Agent
is a piece of information that you browser sends them, it's an
introduction of sorts. Internet Explorer creates the User Agent string
when it is run, and there are no simple steps you can take to alter
what IE sends to the server.
I hope this helps you, let me know if you are still stuck.
Request for Answer Clarification by
05 Feb 2003 18:27 PST
I must of had a 'brain freeze'. For some reason I 'saw' iOpus and it
translated to Opera. That Internet Macro program was uninstalled many
moons ago, and the uninstaller didn't take everything out of the
Registry. So I went into the Registry and searched for iopus, for
InternetMacros, and deleted it manually, especially when I got to the
User Agent field. It worked!! I tested it at audible.com and real.com
and the links you gave me and I'm no longer a Mac user!! Thanks for
your help. I would NEVER have known about those initial server strings
etc... Once you got me on track, it was fixable.