The uasupport.js help file

This script source file uses the function Exami to set a number of properties for the exami and navigator objects. The script source file "ua.js" is embedded in the script.

Properties set by ua.js

navigator.OS
  • "win" for all Windows platforms

  • "mac" for all Macintosh platforms

  • "nix" for all Unix like platforms

  • "" if platform is not one of the above

navigator.org
  • "opera" for Opera based browsers

  • "netscape" for Netscape browsers

  • "microsoft" for Microsoft browsers

  • "compuserve" for Compuserve browsers

  • "sun" for HotJava

  • "" if organization is not one of the above

navigator.version

If the browser organization is one of the above, then the version will be reported in navigator.version as a floating point number. Otherwise, the version will be 0. Note that Gecko based browser will report the Release Version from the UserAgent string and not actual version reported by the vendor.

navigator.family

navigator.family contains a string that groups browsers into families that can be reasonably treated in a similar fashion. Different versions of a browser within a family can be distinguished by the navigator.version property. Current families that are detected are:

  • "hotjava" HotJava browsers from Sun

  • "opera" Opera Browsers

  • "ie3" Internet Explorer versions before 4

  • "ie4" Internet Explorer versions 4 and later

  • "gecko" browsers based upon the Mozilla Open Source browser such as Netscape 6

  • "nn3" Netscape Navigator 3.x browsers

  • "nn4" Netscape Navigator 4.x browsers

  • "aol" AOL browsers

Modifications and add-ons to ua.js

navigator.org

A dozen or so browser organizations are added. (The list is continuously growing and therefore not listed here.)

navigator.version

The script will always try to set the actual version number reported by the vendor. Gecko based browsers will report the release version by an additional property called navigator.rversion.

navigator.rversion

The release version number for Gecko based browsers will be reported in double floating points, i.e. version 1.2 will read "1.02" and version 1.02 "1.0002". Other browsers will report null.

navigator.family
  • "kde" browsers based upon the KDE project such as Konqueror or Safari

navigator.kin

navigator.kin contains a string referring to the browsers’ assumed kinship. It differs from navigator.family by applying to all browsers and it is not influenced by the user agent string. The string is a combination of navigator.appName and navigator.appVersion. Case is preserved.

Note that both navigator.family and navigator.kin are spoofable.

  • "OperaN" Opera browsers (if spoofing is not used) where "N" represents the application version number 4, 5, 6 or 7

  • "MSIE4" Internet Explorer versions 4 and later

  • "Netscape4" Netscape Navigator 4.x browsers

  • "Netscape5" Gecko based browsers such as Netscape versions 6 and later or Mozilla 1.x

  • navigator.appName+parseInt(navigator.appVersion) is resolving the string for all other browsers

navigator.product

navigator.product is already set in some browsers. The script will set the property to all other browsers. Case is preserved.

Note that navigator.product is not spoofable by current methods.

  • "Opera" all Opera browsers (regardless of spoofing attempts)

  • "Trident" Internet Explorer versions 4 and later (the name is an early denomination for the rendering engine)

  • "Netscape4" Netscape Navigator 4.x browsers

  • "Gecko" Gecko based browsers (regardless of spoofing attempts)

  • "uaGecko" browsers presumably trying to spoof as Gecko

  • "appCode"+navigator.appCodeName is resolving the string for all other browsers, normally resulting in "appCodeMozilla"

Additional properties

exami.foe

If the browser is identified by this property the script will simply stop and nothing will happen. exami.foe is intended to refuse certain browsers.

  • boolean

exami.js

The JavaScript version number is set to 1.1, 1.2, 1.3 or 1.5.

  • number

navigator.ECMA

The browser is compliant with the ECMA standard for script languages.

  • boolean

Properties relating to the Document Object Model

The following properties are all boolean.

navigator.DOMCORE1    The basis for DOM level 1.
navigator.DOMHTML      HTML for DOM level 1.
navigator.DOMCORE2    The basis for DOM level 2.
navigator.DOMHTML2    HTML for DOM level 2.
navigator.DOMSTYLE      DOM for any style sheet language.
navigator.DOMCSS           DOM for Cascading Style Sheets.
navigator.DOMEVENTS   Ready for DOM Events.
navigator.DOMCORE3    The basis for DOM level 3

Properties relating to proprietary models

The following properties are both boolean.

navigator.NS4

Netscape proprietary DOM using document.layers

navigator.MSIE

Microsoft proprietary DOM using document.all

© 2003 The Script is FREE FOR USE if author info is provided.