The purpose of JavaScript is to add an extra layer of usability to a Web page. That sounds simple, but this golden rule has frequently been misunderstood. Not all scripts add usability to a Web site; in fact, during several periods of JavaScript's checkered history, the creation of flashy-looking but useless scripts has been a significant cottage industry. Even when writing useful scripts, JavaScript developers haven't always written them in their proper context: that of an accessible, modern HTML page that integrates the insights of the Web standards movement. Worse, some scripts don't add a usability layer, they are the entire usability layerand as a consequence the site falls apart when a browser doesn't support JavaScript. We'll discuss usability, accessibility, and the Web standards movements in Chapter 2. The current chapter focuses on explaining JavaScript's purpose in more depth, so that you understand its role in a Web site. In addition, it discusses the constant redefinition of JavaScript's purpose throughout its history.
|