Data your browser knows: JavaScript
This page shows data your browser knows. Commands (script) in a web page can tell your browser to display some of that data or give it to other computers, or use it to control what is displayed. Those commands can be written in a computer language called JavaScript. Most people do not consider this data too personal to share. But if you do, you can tell your browser not to follow those commands.
Table of Contents of this page
- Data built into the scripting language
- Data from your operating system: the window object
- Data from your web browser: the navigator object
- Data about the current document: the document object
- Other objects
- Browser plug-ins
- Scripting language information
window object
Properties
window.screen object
window.history object
window.document and HTMLDocument objects
An object called "all" within the document object adhers to a standard called the Document Object Model (DOM). That object contains the document itself. The method of using a script to changes itself, is called "Dynamic HTML (DHTML)".
window.document.body object
window.document.documentElement object
window.location and window.document.location objects
clientInformation and navigator (browser) objects
Scripting language built-in objects
Error objects
Date object: var x = new Date();
Math object
Number object
Script Engine functions
Conditional compilation variables
Other objects
var x = java.net.InetAddress.getLocalHost()
x = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
Browser plug-ins
Scripting language information
The scripts in this page are written in ECMAScript, the ECMA 262 scripting language specification (3rd Edition, December 1999). Netscape calls their implementation "JavaScript". Microsoft calls their implementation "JScript". (JScript scripts can run only within a supporting host environment such as Microsoft's Active Server Pages, Internet Explorer, or Windows Script Host.)
For information on ECMAScript, see:
- Microsoft Developer Network (MSDN) Library
- Robert Crooks' JavaScript information
- JavaScript.com
- Standard ECMA-262: ECMAScript Language Specification
For other examples of using JavaScript to get data, see:
- BrowserSpy, by Henrik Gemal
- Privacy Analysis, at Privacy.net
- BrowsInfo, by Elf Qrin
- Browser Sniffer, at Microsoft
- Browser Sniffer, at WebReference.com
- at Phaster.com by Ben
To do
- Drives info, @ variables, document.ypform.S/C/N/T.focus/value/selectedIndex/options
- IE doesn't have class, value, get, HasProperty(PropertyName), GetPropertyName methods?
- Netscape doesn't support the (property in object) operator.
- IE complains if any property is specified for an undefined base object.
- Netscape complains if a property is specified for an object that has none or DNE.
- Distinguish among various kinds of undefined, undeclared, null, unset properties.
- JavaScript
s.replace(/</g,"<")
doesn't validate as proper HTML. - Display all of an [object]'s elements and values. Use constructor property or for(in)?
- In Date(), there's a getUTC* method for each get* method except getTime* and getYear.
- This page is HTML 4.01 Transitional instead of Strict, to allow SCRIPT element's language attribute.
- Show .length when avaliable.
- Show plugin info under IE.
- Summarize standard and past use of DOM.
- Correct variables for plugins?