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

Optimizing Ajax applications automagically through Apache modules/Google mod_pagespeed


Optimizing Ajax applications automagically—without manual effort— is the most wanted tool for any developer. There are a few tools invented for that purpose. In this recipe, we'll see a few such automatic tools.

Getting ready

We'll require a web application running over an Apache web server. For automatic optimization, we need the following Apache modules:

How to do it...

We have to install these modules and then set up the configurations for them to automatically handle the requests. We'll see the configurations for each module:

  1. mod_deflate:

    To enable automatic gzip handling for JavaScript, CSS, and HTML code, we can use AddOutputFilterByType and specify their MIME type:

    <IfModule...