How to Install mod_pagespeed

According to the project page, mod_pagespeed is:

mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server.

mod_pagespeed includes several filter that optimize JavaScript, HTML and CSS stylesheets. It also includes filters for optimizing JPEG and PNG images. The filters are based on a set of best practices known to enhance web page performance. Webmasters who set up mod_pagespeed in addition to configuring proper caching and compression on their Apache distribution should expect to see an improvement in the loading time of the pages on their websites.

Installation

Go to the Page Speed project page and download it (wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb). Then install it (sudo dpkg -i mod-pagespeed-beta_current_amd64.deb). Its a good idea to clean up your stuff unless your working in the tmp directory. The mod_pagespeed module is enabled by default, to disable use a2dismod pagespeed.

Tests and Performance

Google is claiming an reduction of page load time by up to 50%, but the following reviews/blogs measured different numbers:

  • “I get a 13% profit with mostly default values, a good configured server should propably even do better.” found here
  • “Mod_pagespeed may slow down your site, speed up your website significantly or anywhere in between, while running in Safe Mode... If you use the non-Safe Mode filters the speed gain will very likely go up, but maybe not that much.” found here
  • “mod-pagespeed brought an average of 19.9% improvement in page load times” found here