O'Reilly logo

JavaScript® Bible, Seventh Edition by Paul Novitski, Danny Goodman, Tia Gustaff Rayl, Michael Morrison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Developing a Scripting Strategy

IN THIS CHAPTER

  • How leapfrogging browser developments help and hurt web developers

  • Separating the core JavaScript language from document objects

  • The importance of developing a cross-browser strategy

If you are starting to learn JavaScript at this point in the history of scriptable browsers, you have both a distinct advantage and a disadvantage. The advantage is that you have the wonderful capabilities of mature browser offerings from Microsoft, The Mozilla Foundation (under brand names such as Firefox, Netscape, and Camino), Apple, and others at your bidding. The disadvantage is that you have not experienced the painful history of authoring for older browser versions that were buggy and at times incompatible with one another due to a lack of standards. You have yet to learn the anguish of carefully devising a scripted application for the browser version you use, only to have site visitors send you voluminous email messages about how the page triggers all kinds of script errors when run on a different browser brand, generation, or operating system platform.

Welcome to the real world of scripting web pages with JavaScript. Several dynamics are at work to help make an author's life difficult if the audience for the application uses more than a single type of browser. This chapter introduces you to these challenges before you type your first word of JavaScript code. Our fear is that the subjects we raise may dissuade you from progressing further ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required