Opera

Search the knowledge base

How can I find out if someone is using Opera?

Because many sites try to block other browsers than MSIE and Netscape, we have added the ability to disguise Opera as either Internet Explorer or Netscape. This allows Opera to "slip through", as the code used often fails to detect the browser's true name, "Opera", when it is identified as something else.

Opera's browser identification is set in File > Preferences > Network, or from the Quick Preferences menu (press F12 on your keyboard). You have several choices: Opera, Mozilla 5.0 (Netscape 6), Mozilla 4.78, Mozilla 3.0 and MSIE 5.0 (Opera 6) or MSIE 5.5/6.0 (Opera 7). No matter what you identify Opera as, the string "Opera" and the version number will always be present. The following chart lists the different useragent strings and possibilities:

Opera 6

Identify as    :     Useragent string
Opera          :     Opera/X.Y (OS; U)  [la]
Mozilla 5.0    :     Mozilla/5.0 (OS; U) Opera X.Y  [la]
Mozilla 4.78   :     Mozilla/4.78 (OS; U) Opera X.Y  [la]
Mozilla 3.0    :     Mozilla/3.0 (OS; U) Opera X.Y  [la]
MSIE 5.0       :     Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera X.Y  [la]

Opera 7

Identify as    :     Useragent string
Opera          :     Opera/X.Y (OS; U)  [la]
Mozilla 5.0    :     Mozilla/5.0 (OS; U) Opera X.Y  [la]
Mozilla 4.78   :     Mozilla/4.78 (OS; U) Opera X.Y  [la]
Mozilla 3.0    :     Mozilla/3.0 (OS; U) Opera X.Y  [la]
MSIE 5.0       :     Mozilla/4.0 (compatible; MSIE 6.0; OS) Opera X.Y  [la]

Italicized text means that the text might change depending on your Opera version ("X.Y"), operating system ("OS") or language ("la").

Opera is identified as MSIE by default.

You can use JavaScript to detect Opera, even when it reports itself as being another browser. To do this, search the useragent string (navigator.userAgent) for "Opera", rather than looking in navigator.appName.

Example:

if (navigator.userAgent.indexOf('Opera') != -1) {
	document.write("You are using Opera.");
}
else {
	document.write("You are <b>not<\/b> using Opera.");
}
document.write("<p><b><i>navigator.userAgent<\/i> returns<\/b>: " + navigator.userAgent);
document.write("<p><b><i>navigator.appName returns<\/i><\/b>: " + navigator.appName);
document.write("<p><b><i>navigator.appVersion returns<\/i><\/b>: " + navigator.appVersion);