Type: String
OSName returns the general name of the user's operating system, such as "Windows", "OS X", and "Linux". For example, the OSName property is set to "Windows" for all users on Windows XP, Windows Vista, Windows 8 and so forth, and the OSName property is set to "OS X" for all Mac users on OS X. Therefore this property makes it easy to determine if a user is on Windows, OS X, Linux and other operating systems without regards to the version of the OS.
This is the extended property version of OSName. Starting with BrowserHawk 14, the OSName property can be checked as a basic property, so an extended property test is no longer required. If you previously used this property as an extended property, simply remove "OSName" from the list of properties specified in your call to AddProperties and use this OSName property from the BrowserObj class instead of from the ExtendedBrowserObj class. There is no advantage to testing OSName as an extended property for users on Windows and OS X. For users on other operating systems, such as Linux, some additional details may be provided through the extended property version. Unless that is highly desirable, the basic property version of OSName will provide for much faster testing by BrowserHawk.
Tip: See Detecting Operating System Details for examples of the possible values returned by this property.
Special notes for this property:
The visitor's browser must have Java installed and enabled to use this property. In the event they do not, a string value of "-1" or "-2" is returned, depending on various factors.
For browsers other than Internet Explorer on Windows, a string value of "-3" is returned to indicated that no Java plug-in is installed, which is required to detect this property.
This property is not available on Firefox or Mozilla versions prior to 1.0, Safari versions prior to 1.2, Internet Explorer on Macintosh, Netscape versions prior to 4.0, or Opera versions prior to 7.0. In these cases this property will return null.
If the user’s JavaScript is disabled this property will not be available.
Note: Use of this property requires the Enterprise Edition of BrowserHawk.
C# Example:
<%
ExtendedOptions options = new ExtendedOptions();
options.AddProperties("OSName");
ExtendedBrowserObj extBrow = BrowserObj.GetExtendedBrowser(options);
%>
<html>OSName is: <% Response.Write(extBrow.OSName); %>
</html>
See Also:
Detecting Operating System Details
Additional Steps Required for Java based properties
BrowserBitSize Property (.NET)