Some Web sites are designed to work correctly only with certain browsers, and some sites will not even let you access them unless you are using one of their approved browsers. All browsers provide information about their identity that can be queried by Web sites and computer programs, but it is not normally visible.
This Web page checks that you are using an Opera browser (versions 5 to 27), makes the information about its identity visible, attempts to determine whether it is spoofing, and attempts to display its version number.
If your browser could not be identified, or if it was identified incorrectly, then please send me a message so that I can try to improve the identification.
Some Web browsers can be configured to supply identification that belongs to other browsers, a process known as spoofing. This can allow browsers to access Web sites that attempt to restrict access to specified browsers. Perfect spoofing would be impossible to detect.
if (! window.opera)
document.write("<p><strong>You do not appear to be using an Opera Web browser.<\/strong><\/p>");
Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.64
The third step is to convert the data to lower case and search it for one or more strings of characters whose presence and/or absence (alone or in combination) can be used to detect spoofing and to identify a browser. For example, the following definition specifies the presence of “firefox/2”.
else if (navigator.userAgent.toLowerCase().indexOf("firefox/2") != -1)
document.write("<p><strong>Your Web browser claims to be Firefox version 2, but appears to be Opera providing a false identity<\/strong><\/p>");
The fourth step is to check for a string that indicates the browser version, for example:
else if (navigator.userAgent.toLowerCase().indexOf("opera 9.6") != -1)
document.write("<p><strong>Your version of Opera appears to be 9.6<\/strong><\/p>");
This type of identification is not completely accurate, especially when browsers pretend to be other browsers, but it works most of the time.