Example Code > Tools & Utilities > Javascript Client Information |
This simple application demonstrates the types of information that it is possible to return via JavaScript code executed within a client browser. The application is by no means complete and is designed to serve as an example of the type(s) of information available to developers at the client end.
document.activeElement | Returns the currently focused element in the document. |
document.anchors | Returns a collection of all <a> elements in the document that have a name attribute. |
document.applets | Returns a collection of all <applet> elements in the document. |
document.baseURI | Returns the absolute base URI of a document. |
document.cookie | Returns all name/value pairs of cookies in the document. |
document.characterSet | Returns the character encoding for the document. |
document.doctype | Returns the Document Type Declaration associated with the document. |
document.documentURI | Sets or returns the location of the document. |
document.domain | Returns the domain name of the server that loaded the document. |
document.readyState | Returns the (loading) status of the document. |
document.referrer | Returns the URL of the document that loaded the current document. |
document.title | Sets or returns the title of the document. |
document.URL | Returns the full URL of the HTML document. |
location.hash | Sets or returns the anchor part (#) of a URL. |
location.host | Sets or returns the hostname and port number of a URL. |
location.hostname | Sets or returns the hostname of a URL. |
location.href | Sets or returns the entire URL. |
location.origin | Returns the protocol, hostname and port number of a URL. |
location.pathname | Sets or returns the path name of a URL. |
location.port | Sets or returns the port number of a URL. |
location.protocol | Sets or returns the protocol of a URL. |
location.search | Sets or returns the querystring part of a URL. |
navigator.appCodeName | Returns the code name of the browser. |
navigator.appName | Returns the name of the browser. |
navigator.appVersion | Returns the version information of the browser. |
navigator.cookieEnabled | Determines whether cookies are enabled in the browser. |
navigator.geolocation | Returns a Geolocation object that can be used to locate the user's position. |
navigator.language | Returns the language of the browser. |
navigator.onLine | Determines whether the browser is online. |
navigator.platform | Returns for which platform the browser is compiled. |
navigator.product | Returns the engine name of the browser. |
navigator.userAgent | Returns the user-agent header sent by the browser to the server. |
navigator.javaEnabled | Specifies whether or not the browser has Java enabled. |
navigator.taintEnabled | deprecated. |
screen.availHeight | Returns the height of the screen (excluding the Windows Taskbar). |
screen.availWidth | Returns the width of the screen (excluding the Windows Taskbar). |
screen.colorDepth | Returns the bit depth of the color palette for displaying images. |
screen.height | Returns the total height of the screen. |
screen.pixelDepth | Returns the color resolution (in bits per pixel) of the screen. |
screen.width | Returns the total width of the screen. |
window.closed | Returns a Boolean value indicating whether a window has been closed or not. |
window.defaultStatus | Sets or returns the default text in the statusbar of a window. |
window.frameElement | Returns the <iframe> element in which the current window is inserted. |
window.frames | Returns all <iframe> elements in the current window. |
window.innerHeight | Returns the height of the window's content area (viewport) including scrollbars. |
window.innerWidth | Returns the width of a window's content area (viewport) including scrollbars. |
window.length | Returns the number of <iframe> elements in the current window. |
window.name | Sets or returns the name of a window. |
window.opener | Returns a reference to the window that created the window. |
window.outerHeight | Returns the height of the browser window, including toolbars/scrollbars. |
window.outerWidth | Returns the width of the browser window, including toolbars/scrollbars. |
window.pageXOffset | Returns the pixels the current document has been scrolled (horizontally) from the upper left corner of the window. |
window.pageYOffset | Returns the pixels the current document has been scrolled (vertically) from the upper left corner of the window. |
window.screenLeft | Returns the horizontal coordinate of the window relative to the screen. |
window.screenTop | Returns the vertical coordinate of the window relative to the screen. |
window.screenX | Returns the horizontal coordinate of the window relative to the screen. |
window.screenY | Returns the vertical coordinate of the window relative to the screen. |
window.status | Sets or returns the text in the statusbar of a window. |
© Mike Wilcock, 2025.