The uaenvirsniff.js help file

(This document made a call for an "unrequested" pop-up window. If the browser applies pop-up control, it might not have worked. You may try to request the pop-up by this javascript hyper link instead: Requesting the pop-up showing Sniffer results)

The navigator object

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 uasupport (edited ua.js)

navigator.OS
navigator.org
  • "opera" for Opera based browsers

  • "netscape" for Netscape browsers

  • "microsoft" for Microsoft browsers

  • "compuserve" for Compuserve browsers

  • "sun" for HotJava

  • "omni" for OmniWeb

  • "ant_fresco" for ANT Fresco

  • "kde_konqueror" for Konqueror

  • "apple_safari" for Safari

  • "clauss_icab" for iCab

  • "" 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.

The script will always try to set the actual version number reported by the user agent. 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.rv

The actual release version (cp. navigator.rversion above).

  • string

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

navigator.vendor

navigator.vendor is already set in some browsers. The script will set the property to other browsers. It will equal the navigator.org property, but with an upper-case first letter.

navigator.vendorSub

navigator.vendorSub is already set in some browsers. The script will set the property to other browsers. It will make a string of the navigator.version property. Cp. exami.vendorSub below.

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 navigator.kin is spoofable.

navigator.appName+'/'+parseInt(navigator.appVersion) is resolving the string for all browsers, except for Internet Explorer. Examples are listed below.

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

  • "MSIE/4" Internet Explorer versions 4 and later

  • "Netscape/N" Netscape Navigator 3.x or 4.x browsers

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

navigator.product

navigator.product is already set in some browsers. The script will set the property to other browsers. If not specified below, it will equal the navigator.family property, but with an upper-case first letter.

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)

  • "Netscape" Netscape Navigator 3.x or 4.x browsers

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

  • "Gecko_spoofer" browsers presumably trying to spoof as Gecko

  • "KDE" KHTML based browsers, e.g. Konqueror or Safari

navigator.productSub

navigator.productSub is already set in some browsers as the build date. The script will set the property to other browsers as an empty string. The script is using the stringed build date for the exami.productSub property.

Additional navigator properties (not part of uasupport)

navigator.appCodeNameSub

navigator.appCodeNameSub is evaluating the browser's "generation". This property will return a string and the script is using it for the exami.appCodeNameSub property.

  • "3.x" e.g. Netscape Navigator 3.x (where x is a stringed number)

  • "4.x" DHTML browsers (where x is a stringed number)

  • "5.x" Standards compliant browsers using "DOCTYPE switching" (where x is a stringed number)

navigator.js

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

  • number

The exami object

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.ECMA

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

  • boolean

exami.vendorSub

The vendor version number (cp. navigator.vendorSub).

  • number

  • NaN -- if navigator.vendorSub was an empty string

exami.productSub

The build date (cp. navigator.productSub).

  • number, e.g. 20040306

  • NaN -- if navigator.productSub was an empty string

exami.appCodeNameSub

The browser "generation" (cp. navigator.appCodeNameSub).

  • number, e.g. 5

Properties relating to the Document Object Model

The following properties are all boolean.

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

Properties relating to proprietary models

The following properties are both boolean.

exami.NS4

Netscape proprietary DOM using document.layers

exami.MSIE

Microsoft proprietary DOM using document.all

exami.jscript

The JScript version number is set to 3 or whatever number is returned by ScriptEngine. This property applies to Microsoft applications.

  • number between 3 and 5.6 (currently)

  • NaN if not Microsoft

The envir object

This script source file uses the function Envir to set a number of properties for the envir and extra objects. This function depends on the function Exami, declared above (in the same script file).

envir.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


envir.decimalcss

An algorithm will decide on a floating point CSS for the browser, resulting in 0, 0.5, 0.8, 1.1, 1.4, 1.6, 1.8, 2.0 or 2.1.

  • number

envir.language

An array in the source file may be filled up with any language-code such as "en" for English. The default also uses "es", "fr", "de", "ar", "ru", "pt", "ja", "sv", "da", "no", "fi", "nl".

  • language-code

  • "" if not in the array or not reported by the browser

envir.dialect

As above, but also specifying the region by country codes such as "en-GB" for British English.

  • language-code + "-" + country-code if the browser reports both

  • language-code if country code is not reported by the browser

  • "" if not in the array or not reported by the browser

envir.language2

Browser or platform uses an alternative human language. By default this property is set to the Scandinavian languages.

  • boolean

envir.screencolor

The property returns a number.

  • 0 screen resolution is less than 256 colours

  • 1 screen resolution is 256 colours

  • 2 screen resolution is 16-bits (high) colour

  • 3 screen resolution is 24-bits colour

  • 4 screen resolution is 32-bits (true) colour

envir.screensize

The property returns a number.

  • 0 screen resolution is less than 640 x 480 pixels

  • 1 screen resolution is at least 640 x 480 pixels

  • 2 screen resolution is at least 800 x 600 pixels

  • 3 screen resolution is at least 1024 x 768 pixels

  • 4 screen resolution is at least 1152 x 864 pixels

  • 5 screen resolution is at least 1280 x 1024 pixels

  • 6 screen resolution is at least 1600 x 1200 pixels

envir.timezone

The property returns a number, depending on the timezone relative to GMT.

The following properties are all boolean.

envir.java

User has java installed and enabled.

envir.modern

User has java enabled and the browser is compliant with the W3C DOM (level 1) and ECMAScript.

envir.ebusiness

Same as envir.modern, but the user also has cookies enabled, which may be a prerequisite for online business.

envir.CSS

Browser supports Cascading Style Sheets to some extent.

envir.CSS1

Browser supports CSS version 1 to a large extent.

envir.CSS2

Browser supports CSS version 2 to a large extent.

envir.space

User has the screen resolution set to at least 800 x 600 pixels and 256 colours.

envir.muchspace

User has the screen resolution set to at least 1024 x 768 pixels and 16-bits (high) colour.

envir.standards

Browser has taken the W3C HTML standards into account and is to a certain degree compliant with the W3C standards. Currently this applies to Gecko, Internet Explorer 6 on Windows, 5 on Macintosh and Opera 7. This property is spoofable.

envir.threshold

The same as envir.standards but the screen resolution is set to at least 800 x 600 pixels.

envir.strict

Browser is to a great extent ready for HTML4.01Strict and XHTML1.0 and CSS level 2.

envir.xhtmlmod

Browser is compliant with XHTML1.1 (i.e. the XHTML modules for the screen).

envir.dhtml

Browser is at least 4th generation (version 4+) and handles DHTML correctly and is frames enabled.

envir.common

Browser is at least 4th generation (version 4+) as envir.dhtml but also has CSS1 (fully) implemented.

envir.allround

User is at least utilizing an 800 x 600 screen and a CSS1 compliant browser.


envir.oldworld

          User is somewhere in the Old World, in Europe, Africa or Asia.

envir.occident

          User is in West Europe (GMT or CET) or in western parts of Africa.

envir.newworld

User is somewhere in the New World, in America, Oceania or in East-Central Australia.

envir.small

User has the screen resolution set to 640 x 480 pixels or less.


envir.deluxe

User is at least utilizing a 1024 x 768 high colour screen and browser has CSS1 support.

Propertied based on the extra object

Properties belonging to the extra object are only used internally by the script and is therefore not listed here.

envir.strictjava

User has Sun java (or equivalent) installed and enabled. (Microsoft java returns false.)

envir.flashpage

User has Macromedia Flash installed and enabled for sure. (It might be there even so.)

  • boolean if the mimeTypes array is filled (e.g. Gecko, Opera)

  • null if the mimeTypes array is empty (e.g. Internet Explorer)

envir.pdfpage

User has Adobe Acrobat Reader installed and enabled for sure. (It might be there even so.)

  • boolean if the mimeTypes array is filled (e.g. Gecko, Opera)

  • null if the mimeTypes array is empty (e.g. Internet Explorer)

envir.quickpage

User has Apple Quicktime installed and enabled for sure. (It might be there even so.)

  • boolean if the mimeTypes array is filled (e.g. Gecko, Opera)

  • null if the mimeTypes array is empty (e.g. Internet Explorer)

© 2001-2004 The Script is FREE FOR USE if author info is provided.