|
Using Javascript to gather Cient Browser Information |
Return to Index | |
Standard values
This list is far from extensive, but these are the standard javascript values that seem to be most consistently available regardless of browser type (so long as the browser is not an antique).
Custom Browser Info Object - BRinfo
A custom built object designed to store environment variables in a form useful for javascript code writers. It has been designed as simply as I can for the moment, and with flexibility rather than detailed functionality in mind.
First include the following lines of code in the <HEAD> of your html page. This incorporates the file brinfo.js into your own javascript code, (click on the file name to view the script).
<script type="text/javascript" language="javascript" src="brinfo.js">
document.write("Included JS file not found") // (only happens if src doesn't load)
</script>
when you include this file, a new object BRinfo is automatically created. All this object contains is a list of variables that you can easily access using the format BRinfo.theVariableName. The following is a list of the variable names
js_version
os_name
isMSIE
MSIEVersion
isNetscape
NetscapeVersion
isOpera
OperaVersion
isAOL
AOLVersion
cookies_on
language
CanDetectPlugins
FlashFound
DirectorFound
QuickTimeFound
RealFound
And the same list again, with a bit more information plus the value determined for the current browser
Stuff that may not be worth bothering with
The code used for any following information is just playing around really, and is not part of the script brinfo.js, but is included (for interest) in the code of this current html page. MSIE (Microsoft Internet Explorer) browsers may display nothing