Google mod_pagespeed is an Apache HTTPD module that optimizes web pages that it serves, and their associated resources. It's composed of several "filters" that are responsible for rewriting HTML, combining and inlining CSS and JS, and so on. The module behavior and the filter it uses are fully configurable.
The module is currently only available for linux (x86 and x86-64), as a .deb (Debian/Ubuntu) and .rpm (CentOS/Fedora) packages. It can be downloaded on this page : http://code.google.com/speed/page-speed/download.html.
$ dpkg -i mod-pagespeed-*.deb
$ apt-get -f install
$ yum install at
$ rpm -U mod-pagespeed-*.rpm
At this point, the module is enabled by default for the entire apache server, on all vhosts. If you want to enable the module only for one or more vhosts, you have to:
<IfModule pagespeed_module>
ModPagespeed on
</IfModule>
The exhaustive list of filters used by default and how to enable or disable it are described in this page : http://code.google.com/speed/page-speed/docs/config_filters.html
HTTP 1.1 specifies that browsers should send only two parallel requests to the same host. If you have 40 or more static resources (img, CSS, JS) on a single page, your browser will spend many time waiting to an available slot to download these resources.
A common trick is to have several domains serving your static resources, eg. www1.mydomain.com, www2.mydomain.com, ...
Since version 3.2.1 you can configure Ametys to take advantage of multiple domains for serving static resources.
Follow these steps to set up Ametys accordingly:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ametys="org.ametys.web.transformation.xslt.AmetysXSLTHelper" exclude-result-prefixes="ametys">
<img src="{$skinContext}/img/banner.png" alt=""/>
<img src="{ametys:absoluteSkinContext($skin, $site)}/img/banner.png" alt=""/>
Since version 3.3, you may also use the ametys:absoluteSkinContext(skin, site, path) which ensures that all calls to a given path will correspond to the same random URL, so that the browser properly cache the resource.