JavaScript

JavaScript is a programming language; it is not the same as Java (another programming language). 

Truth

Most current browsers support JavaScript, i.e. they are capable of executing it.

JavaScript can be disabled by the user.  Because JavaScript can be used to do evil things, some users do, in fact, disable it.

JavaScript is required for the functioning of many web applications (as contrasted with web sites), such as interactive mapping services, thus users of such applications must have JavaScript enabled (at least while using those applications).

JavaScript is invoked by the HTML <script> tag, or by being specified as the target of an intrinsic event, such as 'onfocus'.  HTML also provides a <noscript> element.  If JavaScript is disabled (or the browser does not support it), the browser will display the contents of the <noscript> element, thus permitting the presentation of alternate material.  If JavaScript is not available, intrinsic events will result in no action being taken.

Consequences

JavaScript will be ignored by some user systems.  In this case, the <noscript> material, if you have provided any, will be rendered.

Recommendations

Design your site making the assumption that JavaScript is not available. 

Tips

  1. Use JavaScript only for optional function or decoration.
  2. If you want to use JavaScript for a fancier critical function, such as navigation, always provide an alternative via the <noscript> element.
  3. If your site contains a function which is critical to the user and cannot be implemented without using JavaScript (or some other programming language), use the <noscript> element to politely alert the user to this requirement, e.g. "If you enable JavaScript on your browser, you will be able to use a celestial navigation calculator".
  4. In cases such as that above, consider using a program executing at the server with an HTML form interface, to remove the user's dependancy on things other than HTML.  (The details of how to do this far exceed the scope of these pages).

Last revised 7 Nov 2009