Chapter 1. Purpose
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 layer—and as a consequence the site falls apart when a browser doesn’t support JavaScript. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access