Although Javascript is enabled by default in most popular browsers, it also can be disabled by the user. People might disable Javascript because:
Since you have no control over whether Javascript is enabled, consider whether it is really necessary before implementing it.
Web pages which use Javascript must function gracefully if Javascript is disabled or otherwise unavailable.
Use caution with Javascript and Document Object Model (DOM) features which can cause the following problems:
Example 1: Some search engine spiders ignore all Javascript, so if you've inserted significant data as Javascript it likely won't get indexed by all search engines.
Example 2: Search engines and link checkers can't follow links created with Javascript, so underlying pages won't be indexed and won't be checked for links unless regular links appear elsewhere on the page.
Reducing or ignoring usability and accessibility and device independence in order to provide what is usually unnecessary interactivity:
Example 1: If you've used Javascript to put new information in the status bar:
Example 2: If I must mouse over various buttons to make new text appear...
Instead of using Javascript for form validation, use server-side scripting for validation, since we have control of the server and since our site is not heavy with traffic.
Instead of using Javascript for displaying information interactively, put the information right on the page using proper information structures such as structured headings or data tables.
Our site automatically includes server-side browser detection. If you need functions to detect specific browsers, see /.stylesheets/agent.php for details. agent.php is automatically loaded by the template framework for every page, so you may use its functions as needed.
Instead, use plain text or transparent GIF image links which include CSS pseudo-class behaviors by default. Avoid using text as graphics, which increases download times and reduces device independence. See Links for details. See Downloads for transparent GIF image link examples.
Some Web page requirements or Web applications may require Javascript and Document Object Model (DOM) features.
If you have such an application, it must be approved by the Associate Dean for Planning and Communications.
Go To: Interaction Design or Style Guide