Chapter 6. Optimization
In this chapter, we will cover the following topics:
Caching of objects
Getting optimization tips with YSlow
Speeding up JavaScript delivery through automatic compression and browser caching
Triggering JavaScript early/on DOM load
Lazy-loading of images
Optimizing Ajax applications automagically through Apache modules/Google mod_pagespeed
As JavaScript developers, we often face performance issues—slow loading of pages, poorly responsive pages, freezing of browser windows, and so on. Mostly, all these happen because of the bottlenecks in the script or the approach/algorithm we have taken. In this chapter, let's discuss possible approaches to solve these issues.