While we certainly do not want to discourage a site owner from adding functionality to their sites by adding javascript. There are some things to take into consideration.
- It's best to discuss the addition of any javascript to your site with the webteam.
- If you add it, it's your responsibility to make sure it works for everyone who accesses it. And to also make sure it does not break existing Javascript.
- You'll need to test it in all typical browsers and on both Mac and PC. That means on a PC; IE6, IE7, IE8, Firefox 3x, Chrome, and Safari (most recent version on both the last two). On a Mac that means Firefox 3x, and Safari.
- If you add javascript, it could break existing Javascript, so double check this by also checking the functionality of any original javascript (if any) when you test.
- Do you know about using/coding Javascript? Can you support this javascript? If we didn't write the javascript, we can't support it.
- The script you add cannot cause any javascript errors. This means that it needs to play nicely with both IE6 and IE8.
- Please stop and think before you add it. Is it functionality or bling? Is there a solid reason for needing it? There is a tendency to want to make a page lots more fun by adding lots of neat stuff... which is great for a personal site or for a site that is purely for entertainment. It could truly hinder or push users away from an informational site.
- The page you've added it to must still validate (please see Web Accessibility Policy and Standards for more).