The envirsniff.js help file

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 in "uasupport.js".

Recommended properties

The following properties are all boolean.

envir.java

User has java installed and enabled.

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

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

envir.strict

Browser is to a great extent ready for HTML4.01Strict and XHTML1.0 and CSS2.

envir.dhtml

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

envir.allround

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


Further properties

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


envir.modern

User has java enabled and the browser is compliant the W3C DOM (version 1).

envir.ebusiness

User has java and cookies enabled, which may be a prerequisiite for online business. The property declaration should be edited in the source file, if Netscape Navigator 4 is to be catered for by this property.


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.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.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 and at least 256 colours.


envir.deluxe

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


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

envir.pdfpage

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

envir.quickpage

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

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