If a property or value is struck, it is deprecated and would possibly be undefined in later releases of the script.
This script source file uses the functions Exami and xbDetectBrowser to set a number of properties for the exami and navigator objects.
This is partly derivative work on the now dated Practical Browser Sniffer.
Initially set to equal navigator.appVersion. Returns a number. The property value will normally be changed to the brand specific version number. However, if the browser is spoofing as another browser, notably Opera like Internet Explorer, the spoofed version number will be used instead.
The release version number for Gecko based browsers will be reported in double floating points, i.e. version 1.7 will read "1.07" and version 1.7.5 "1.0705". Other browsers will report 0.
The actual release version (cp. navigator.rversion above).
string
The popular name (or brand) of the browser. It will equal the navigator.vendor value, if the browser, notably Gecko browsers, has that property set other than to an empty string. Possible values for other browsers:
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 formerly used navigator.family property, but with an upper-case first letter.
Note that navigator.product is normally not spoofable, but Safari calls its product for "Gecko".
"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) and Safari
"Gecko_spoofer" browsers presumably trying to spoof as Gecko
"KDE" KHTML based browsers, e.g. Konqueror
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.
navigator.kin contains a string referring to the browsers’ assumed kinship. It differs from the formerly used 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, 7 or 8
"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.appCodeNameSub is representing the browser's "generation". It's based on the number next to "Mozilla/" in the user agent string, but it is evaluated in the context of the DHTML capabilities of the browser, and may accordingly have been adjusted. This somewhat spoofable property will return a string.
"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)
"" if the browser is not using "Mozilla" as the value of navigator.appCodeName
The JavaScript version number is set to 1.1, 1.2 or 1.3*
number
*The special indicator of version 1.5 has been removed.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
The browser is compliant with the ECMA-262 standard for script languages.
boolean
The build date (cp. navigator.productSub).
number, e.g. 20040306
NaN -- if navigator.productSub was an empty string
The browser "generation" (cp. navigator.appCodeNameSub).
number, e.g. 5
The following properties are all boolean.
The following properties are both boolean.
Netscape proprietary DOM using document.layers
Microsoft proprietary DOM using document.all
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
This script source file uses the function Envir to set a number of properties for the envir object. This function depends on the function Exami, declared above (in the same script file).
This property equals the formerly used 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
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
Based on navigator.language, navigator.userLanguage or navigator.browserLanguage
language-code
"" if not reported by the browser
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 reported by the browser
Browser or platform uses an alternative human language. By default this property is set to the Scandinavian languages.
boolean
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
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
The property returns a number, corresponding to the timezone relative to GMT, e.g. 2 if in West Europe in
Summer.
The following properties are all boolean.
Old world timezones (from Cape Verde to Japan and Australia)
West European timezones (incl. West Africa), and daylight saving time taken into account
New World timezones (incl. the Pacific and Far Eastern parts of Russia)
User has java installed and enabled.
User has Sun java (or equivalent) installed and enabled. (Microsoft java returns false
.)
User has java enabled and the browser is compliant with the W3C DOM (level 1) and ECMAScript.
Same as envir.modern, but the user also has cookies enabled, which may be a prerequisite for online business.
Browser supports CSS version 1 to a large extent. (Note that this property will return a number in later releases of the script.)
Browser supports CSS version 2 to a large extent. (Note that this property will return a number in later releases of the script.)
User has the screen resolution set to 640 x 480 pixels or less.
User has the screen resolution set to at least 800 x 600 pixels and 256 colours.
User has the screen resolution set to at least 1024 x 768 pixels and 16-bits (high) colour.
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.
The same as envir.standards but the screen resolution is set to at least 800 x 600 pixels.
Browser is to a great extent ready for HTML4.01Strict and XHTML1.0 and CSS level 2.
Browser is compliant with XHTML1.1 (i.e. the XHTML modules for the screen).
Browser is at least 4th generation (version 4+) and handles DHTML correctly and is frames enabled.
Browser is at least 4th generation (version 4+) as envir.dhtml but also has CSS1 (fully) implemented.
User is at least utilizing an 800 x 600 screen and a CSS1 compliant browser.
User is at least utilizing a 1024 x 768 high colour screen and browser has CSS1 support.
NOTE: The properties listed here are only returning empty strings in order not to break older versions of the script, since the extra object has been removed.
© 2001-2005 The Script is FREE FOR USE if author info is provided.