Summary
In this chapter, we learned several optimization techniques that can be used to improve the performance of jQuery applications, especially when they become large and complex.
We started with simple practices like bundling and minifying our JavaScript files and discussed the benefits of using CDNs to load third-party libraries. We then went on to analyze some simple patterns to writing efficient JavaScript code and learned how to write efficient CSS selectors to improve the page's rendering speed and DOM traversals using jQuery.
We continued with jQuery-specific practices such as caching of jQuery Composite Collection Objects, how to minimize DOM manipulations, and had a reminder of the Delegate Observer pattern, as a good example of the Flyweight Pattern. Lastly, we got an introduction to the advanced technique of Lazy Loading and saw a demonstration of how to load the various modules of an implementation progressively, based on user actions.
After completing this chapter, we are now...