PageSpeed Optimization Libraries

PageSpeed Optimization Libraries are a set of C++ classes that automatically optimize web pages and resources they use, using a server-independent framework. The libraries are open-source, and we welcome any community contributions!

Three steps to working with the APIs

Install

The first step to use PSOL is to build mod_pagespeed from source. Note that this will build the Apache module, but we will not be using Apache or the module for PSOL or our sample application. Curent limitations on the build system employed by PSOL make it necessary to first compile mod_pagespeed.

Instructions can be found on the mod_pagespeed wiki under HowToBuild. Once you have completed that step enter the commands:

  cd INSTALL_DIR/src/pagespeed/automatic
  make all
This will generate the library pagespeed_automatic.a in the current directory.

Use the sample application as a reference

The mod_pagespeed source has a directory containing a simple integration with the PageSpeed Optimization Libraries. In it, please look at the Makefile, main class, and main program.

Read the APIs

The class library documentation can be found in the API docs.