JavaScript Libraries by Maximiliano Firtman

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

O'Reilly logo

JavaScript Libraries

The life of a JavaScript programmer has changed radically since 2006, with the appearance of Ajax and hundreds of libraries that help us work better with this language. Many of these libraries modify or add complete new behaviors to the language, creating new languages inside (or over) JavaScript.

If the libraries are based on JavaScript, and mobile browsers support JavaScript, why do we care? The answer is that many of these libraries rely on some not-so-clear things in the standard, and while they have been prepared and tested on well-known desktop browsers (Internet Explorer, Firefox, Safari, Chrome, Opera), they have not been tested on all the mobile browsers. And as we’ve already seen, some DOM features (for example) are missing in many mobile browsers.

That is the first reason why we need to be careful about using big JavaScript libraries. The second (no less important) reason is the impact on download and execution times. As mentioned earlier, these libraries modify the language and the behavior of objects, and even if we don’t use any (or very little) of a library’s code, the library will need to load itself completely, which takes time. This can lead to performance problems in some browsers, so we are going to test the time that typical libraries take to initialize themselves on mobile browsers.

Warning

Some libraries, in their complete form, are larger than 600 KB. We need to be very careful about performance when using that code, as it will increase network ...

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