Book Image

PHP Ajax Cookbook

Book Image

PHP Ajax Cookbook

Overview of this book

Table of Contents (16 chapters)
PHP Ajax Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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.