browser object which allows the creation of very readible code. For instance, on Netscape 4.7, the property
browser.isNS4 would be
browser.isIE would be
false. A complete list of properties and their meanings can be found in the usage instructions.
The latest version features improved version detection, differentiates between Netscape 6.x and Mozilla, and the ability to detect Gecko as an embedded layout engine. Version 2.0 is not backward compatible with version 1.x of this script.
This browser detection script relies on the browser identifying itself correctly through it's
User-Agent HTTP header. Some browsers allow the user to modify this value to the point where this script will not be able to correctly identify their browser and may mis-identify it as a different browser. An alternative to relying on the
User-Agent value, I prefer my method.
Fixed a bug that mis-reported IE5.5 as IE4 and added IE6 support.
Fixed IE6 support (it was ok for the beta version but not the released non-beta).
New version with a different approach. Not backward compatible.
Fixed Mozilla after-load support.
Added properties that reflect DOM support and quirks/standards modes.
Added NS7 detection and improved version number reporting for Mozilla.
Fixed WinXP detection under Opera (Opera doesn't use the standard "Windows NT 5.1" but "Windows XP") (thanks Zakoops).
Added Safari and removed WebTV detection. Safari is currently in beta so the
versionMinor report the build number (this may change). Also made a separate detection for Linux (separate from Unix).
Prevented Safari from returning true on isNS.
Changed the name of the script to
browser_detect.js (dropping the "lite" bit) and updated the documentation to match.
Added OmniWeb support, AppleWebKit and equivalent-Mozilla version numbers.
isFirebird variable to
isFirefox (thanks nasten).
This script is released under a Creative Commons License.