O'Reilly logo

HTML5 iPhone Web Application Development by Alvin Crespo

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

Optimizing JavaScript

Now that we have covered the optimization of stylesheets, let's look at our scripts. JavaScript has also had a history of being dropped onto the page without any forethought or planning, and in general has led to bad reputation for the language. But again, because of the complex nature of web applications, the open source community has helped shape the language.

Throughout the book, we have adopted several industry standards, including namespaces, closures, caching variables, and so on. However, it is also essential we validate and profile our scripts so they can be optimized. In this section, we will go through this and hopefully cover the major points needed to make high-performance mobile applications.

Validating JavaScript ...

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