Move in incubator-pagespeed-mod/html
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
diff --git a/doc/.htaccess b/doc/.htaccess
new file mode 100644
index 0000000..38821b0
--- /dev/null
+++ b/doc/.htaccess
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Turn on server side include processing for the header inclusion.
+AddOutputFilter INCLUDES .html
+Options +Includes
+Options +FollowSymLinks
+
+# Make /foo.html available at /foo
+RewriteEngine on
+RewriteCond %{REQUEST_FILENAME}.html -f
+RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L]
+
+# Turn on mod_pagespeed to optimize our docs.
+ModPagespeed on
+ModPagespeedRewriteLevel CoreFilters
+ModPagespeedEnableFilters collapse_whitespace
+ModPagespeedEnableFilters remove_comments
+ModPagespeedInPlaceResourceOptimization on
+
+# Do not optimize these resources which are used for blogpost
+ModPagespeedDisallow */puzzle_optimized_to_low_quality_webp.webp
+ModPagespeedDisallow */puzzle_optimized_to_low_quality_webp_and_saved_as_png.png
+ModPagespeedDisallow */puzzle_original.jpg
diff --git a/doc/CVE-2012-4001.html b/doc/CVE-2012-4001.html
new file mode 100644
index 0000000..97be44f
--- /dev/null
+++ b/doc/CVE-2012-4001.html
@@ -0,0 +1,59 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>mod_pagespeed Security Advisory: Insufficient Hostname Verification</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>mod_pagespeed Security Advisory: Insufficient Hostname Verification</h1>
+<dl>
+ <dt>CVE Identifier:</dt>
+ <dd>CVE-2012-4001</dd>
+ <dt>Disclosed:</dt>
+ <dd>September 12, 2012</dd>
+ <dt>Versions Affected:</dt>
+ <dd>All versions of mod_pagespeed up to and including 0.10.22.4.</dd>
+ <dt>Summary:</dt>
+ <dd>mod_pagespeed performs insufficient verification of its own host name,
+ which makes it possible to trick it into doing HTTP fetches and resource
+ processing from arbitrary host names, including potentially bypassing
+ firewalls.</dd>
+ <dt>Solution:</dt>
+ <dd>mod_pagespeed 0.10.22.6 has been released with a fix.</dd>
+ <dt>Workaround:</dt>
+ <dd>If you are unable to upgrade to the new version, you can avoid this
+ issue by changing your Apache httpd configuration. Give any virtual host
+ that enables mod_pagespeed (and the global configuration, if it also enables
+ mod_pagespeed) an accurate explicit <code>ServerName</code>, and set the
+ options <code>UseCanonicalName</code> and
+ <code>UseCanonicalPhysicalPort</code> to <code>On</code> in each. Please be
+ aware, however, that depending on the version,
+ <a href="CVE-2012-4360">CVE-2012-4360</a> may also apply.
+ </dd>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/CVE-2012-4360.html b/doc/CVE-2012-4360.html
new file mode 100644
index 0000000..ee824f3
--- /dev/null
+++ b/doc/CVE-2012-4360.html
@@ -0,0 +1,49 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>mod_pagespeed Security Advisory: Cross-Site Scripting</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>mod_pagespeed Security Advisory: Cross-Site Scripting</h1>
+<dl>
+ <dt>CVE Identifier:</dt>
+ <dd>CVE-2012-4360</dd>
+ <dt>Disclosed:</dt>
+ <dd>September 12, 2012</dd>
+ <dt>Versions Affected:</dt>
+ <dd>mod_pagespeed versions 0.10.19.1 through 0.10.22.4 (inclusive).
+ Versions 0.9.18.6 and earlier are unaffected.</dd>
+ <dt>Summary:</dt>
+ <dd>mod_pagespeed performs insufficient escaping in some cases, which can
+ permit a hostile 3rd party to inject JavaScript running in context of
+ the site.</dd>
+ <dt>Solution:</dt>
+ <dd>mod_pagespeed 0.10.22.6 has been released with a fix.</dd>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/CVE-2013-6111.html b/doc/CVE-2013-6111.html
new file mode 100644
index 0000000..245abf6
--- /dev/null
+++ b/doc/CVE-2013-6111.html
@@ -0,0 +1,80 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>mod_pagespeed and ngx_pagespeed Security Advisory: Cross-Site Scripting</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>mod_pagespeed and ngx_pagespeed Security Advisory: Cross-Site Scripting</h1>
+<dl>
+ <dt>CVE Identifier:</dt>
+ <dd><p>CVE-2013-6111</p></dd>
+ <dt>Disclosed:</dt>
+ <dd><p>October 28th, 2013</p></dd>
+ <dt>Versions Affected:</dt>
+ <dd>
+ <ul>
+ <li>mod_pagespeed versions earlier than 1.0</li>
+ <li>mod_pagespeed version 1.0.22.7 (fixed in 1.0.22.8)</li>
+ <li>mod_pagespeed versions 1.1</li>
+ <li>mod_pagespeed 1.2.24.1 (fixed in 1.2.24.2)</li>
+ <li>mod_pagespeed 1.3.25.1 through 1.3.25.4 (fixed in 1.3.25.5)</li>
+ <li>mod_pagespeed 1.4.26.1 through 1.4.26.4 (fixed in 1.4.26.5)</li>
+ <li>mod_pagespeed and ngx_pagespeed 1.5.27.1 through 1.5.27.3 (fixed in 1.5.27.4)</li>
+ <li>mod_pagespeed and ngx_pagespeed 1.6.29.1 through 1.6.29.6 (fixed in 1.6.29.7)</li>
+ </ul>
+ </dd>
+ <dt>Summary:</dt>
+ <dd><p>Some versions of mod_pagespeed and ngx_pagespeed are vulnerable to
+ cross-site scripting (XSS), which can permit a hostile 3rd party to
+ inject javascript running in the context of the site.</p></dd>
+ <dt>Solution:</dt>
+ <dd><p>For mod_pagespeed, update to one of versions 1.0.22.8-stable,
+ 1.2.24.2-stable, 1.3.25.5-stable, 1.4.26.5-stable, 1.5.27.4-beta, or
+ 1.6.29.7 or newer.</p>
+
+ <p>For ngx_pagespeed, update to 1.6.29.7 or newer.</p>
+ </dd>
+ <dt>Workaround:</dt>
+ <dd>
+ <p>No workaround is available for mod_pagespeed.</p>
+
+ <p>For ngx_pagespeed, you can completely prohibit access to
+ <code>/ngx_pagespeed_statistics</code>,
+ <code>/ngx_pagespeed_global_statistics</code> and
+ <code>/ngx_pagespeed_message</code> (an IP whitelist is insufficient), via
+ options similar to:
+<pre>
+location /ngx_pagespeed_global_statistics { deny all; }
+location /ngx_pagespeed_statistics { deny all; }
+location /ngx_pagespeed_message { deny all; }
+</pre>
+ </p>
+ </dd>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/_footer.html b/doc/_footer.html
new file mode 100644
index 0000000..ca41793
--- /dev/null
+++ b/doc/_footer.html
@@ -0,0 +1,110 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div id=footer>
+ <!--#include virtual="_navline.html" -->
+</div>
+
+<script>
+function buildTocHelper(node, headers) {
+ if (node.nodeType == 1) {
+ // Element node.
+ var nodeName = node.nodeName.toLowerCase();
+ if (nodeName == "h2" || nodeName == "h3" || nodeName == "h4" ||
+ nodeName == "h5" || nodeName == "h6") {
+ if (node.id) {
+ headers.push([nodeName, node.innerHTML, node.id]);
+ node.appendChild(document.createTextNode("\u00A0")); // nbsp
+ var a = document.createElement("a");
+ a.class = "header-link";
+ a.href = "#" + node.id;
+ a.textContent = "\uD83D\uDD17"; // link symbol
+ node.appendChild(a);
+ }
+ } else {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ buildTocHelper(node.childNodes[i], headers);
+ }
+ }
+ }
+}
+
+function buildToc() {
+ var headers = [];
+ buildTocHelper(document.body, headers);
+ if (headers.length == 0) {
+ return;
+ }
+
+ var toc = document.getElementById("toc");
+ var tocContents = document.createElement("div");
+ tocContents.id = "toc-contents";
+ tocContents.textContent = "Contents";
+ toc.appendChild(tocContents);
+
+ var level = 1;
+ var currentUl = null;
+ for (var i = 0; i < headers.length; i++) {
+ var header = headers[i];
+ var headerLevel = header[0];
+ var headerValue = header[1];
+ var headerId = header[2];
+
+ var newLevel = parseInt(headerLevel.substring(1));
+ while (newLevel > level) {
+ // We loop here to handle the case where we have h2 ... h4. This
+ // isn't a good way to write html, but someone may still do it.
+
+ var newUl = document.createElement("ul");
+ if (currentUl == null) {
+ toc.appendChild(newUl);
+ } else {
+ currentUl.appendChild(newUl);
+ }
+ currentUl = newUl;
+ level++;
+ }
+ while (newLevel < level) {
+ currentUl = currentUl.parentNode;
+ level--;
+ }
+ var li = document.createElement("li");
+ var a = document.createElement("a");
+ a.href = "#" + headerId;
+ a.textContent = headerValue;
+ li.appendChild(a);
+ currentUl.appendChild(li);
+ }
+}
+
+function wrapTables() {
+ var tables = document.getElementsByTagName("table");
+ for (var i = 0; i < tables.length; i++) {
+ var table = tables[i];
+ var parent = table.parentNode;
+ var div = document.createElement('div');
+ div.className = "table-wrapper";
+ parent.insertBefore(div, table);
+ div.appendChild(table);
+ }
+}
+
+buildToc();
+wrapTables();
+</script>
diff --git a/doc/_header.html b/doc/_header.html
new file mode 100644
index 0000000..6586f0d
--- /dev/null
+++ b/doc/_header.html
@@ -0,0 +1,34 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div id=header>
+ <div id=logoline>
+ <div id=logo>
+ <img src="https://www.gstatic.com/images/branding/product/1x/pagespeed_32dp.png"
+ srcset="https://www.gstatic.com/images/branding/product/2x/pagespeed_32dp.png"
+ width=32 height=32 alt="pagespeed logo">
+ </div>
+ <div id=logotext>Apache PageSpeed (Incubating)</div>
+ </div>
+ <div id=navline>
+ <a href="/doc/">← documentation index</a>
+ </div>
+</div>
+<div id=toc></div>
+<img src="/incubator.png" height="80" align="right">
diff --git a/doc/_navline.html b/doc/_navline.html
new file mode 100644
index 0000000..8eb1431
--- /dev/null
+++ b/doc/_navline.html
@@ -0,0 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div id=navline>
+ <a href="/doc/">← documentation index</a>
+</div>
diff --git a/doc/admin.html b/doc/admin.html
new file mode 100644
index 0000000..fb85f73
--- /dev/null
+++ b/doc/admin.html
@@ -0,0 +1,411 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Admin Pages</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed Admin Pages</h1>
+<p>
+ The admin pages are a collection of features that provide visibility
+ into the operation of the PageSpeed optimizations.
+</p>
+<p>
+The pagespeed_admin and pagespeed_global_admin pages aggregate a set of pages
+showing server state so they can be accessed from a single handler. By
+organizing all these features under a single admin page, this can be done once,
+and can serve as a launching point for future administration features.
+Before <strong>version 1.9.32.1</strong> the admin pages were read-only, but
+starting in <strong>version 1.9.32.1</strong>, cache purging is supported.
+</p>
+<img src="images/admin_config.png" style="border:1px solid black" />
+<p>
+ The name of the currently active page is underlined in the top navigation bar.
+</p>
+<table>
+ <thead>
+ <tr>
+ <th>Page</th>
+ <th>Related Options</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Statistics</td>
+ <td>
+ <a href="#statistics"><code>Statistics</code></a><br/>
+ <a href="#virtual-hosts-and-stats"
+ ><code>UsePerVHostStatistics</code></a><br/>
+ <code>mod_pagespeed_beacon</code><br/>
+ <code>ngx_pagespeed_beacon</code>
+ </td>
+ <td>
+ Shows server statistics since startup, such as how many
+ resources are being optimized by filters, as well as various
+ latency and cache effectiveness metrics.
+ </td>
+ </tr>
+ <tr>
+ <td>Configuration</td>
+ <td><a href="config_filters">Configuring Filters</a><br/>
+ <a href="https_support#spdy_configuration"
+ ><code>ModPagespeedIf</code></a> (Apache only)</td>
+ <td>
+ Shows detailed configuration information including all filters,
+ options, and the current cache flush timestamp.
+ </td>
+ </tr>
+ <tr>
+ <td>Histograms</td>
+ <td>
+ <a href="filter-instrumentation-add"
+ ><code>add_instrumentation</code></a><br/>
+ </td>
+ <td>
+ Shows detailed latency data for Page Load Time, rewriting,
+ caches and HTTP fetching.
+ </td>
+ </tr>
+ <tr>
+ <td>Caches</td>
+ <td>
+ <a href="system#memcached"><code>MemcachedServers</code></a>
+ <a href="system#shm_cache"><code>CreateSharedMemoryMetadataCache</code></a>
+ <a href="system#purge_cache"><code>EnableCachePurge</code></a>
+ </td>
+ <td>
+ Shows detailed cache configuration information. When accessed
+ from the Admin handler, it can be used to inspect the contents
+ of the cache, and provides an interface to purge the cache.
+ </td>
+ </tr>
+ <tr>
+ <td>Console</td>
+ <td>
+ <a href="admin#statistics"><code>Statistics</code></a><br/>
+ <a href="console#configuring"><code>StatisticsLogging</code></a><br/>
+ <a href="console#configuring"><code>LogDir</code></a>
+ </td>
+ <td>
+ Displays a <a href="console">console</a> of graphs
+ of server optimization behavior over time.
+ </td>
+ </tr>
+ <tr>
+ <td>Message History</td>
+ <td>
+ <a href="#message-buffer-size"><code>MessageBufferSize</code></a>
+ </td>
+ <td>
+ Server-wide history of recent logging output from PageSpeed,
+ including messages that are omitted from the server log file based on
+ its log level.
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p>
+ Before 1.8.31.2, the main admin page is not available, but there
+ are page-specific handlers for statistics, messages, and the
+ console. In 1.8.31.2 and later, the <code>*_pagespeed_*</code> handlers, such
+ as <code>mod_pagespeed_statistics</code>, will continue to be supported:
+<ul>
+ <li>They provide read-only access to server operation. There may
+ be cases where a site owner wants to share statistics or console
+ information but not the ability to purge the cache.</li>
+ <li>Existing configurations must continue to work after an upgrade to
+ a release that supports pagespeed_admin.</li>
+ <li>The admin pages may later gain support for modifying the server
+ state</li>
+</ul>
+</p>
+<h2 id="config">Configuring Admin Pages</h2>
+
+<p>
+ In this table we use the term "server" for an Apache VirtualHost and
+ an nginx Server Block. We use the term "global" to mean the entire
+ Apache or nginx system, covering all the configured VirtualHost and
+ Server Blocks.
+</p>
+<table>
+ <thead>
+ <tr><th>Apache Handler</th><th>Nginx Option</th><th>Version</th>
+ <th>Description</th></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>pagespeed_admin</code></td>
+ <td><code>AdminPath</code></td>
+ <td>1.8.31.2+</td><td>Covers all administrative functions for
+ a host in one handler. If you establish this handler,
+ you don't need any of the other server-scoped methods. Only
+ give 'admin' page access to clients that you are comfortable
+ allowing to modify the state of your PageSpeed configuration.
+ </td>
+ </tr>
+ <tr>
+ <td><code>pagespeed_global_admin</code></td>
+ <td><code>GlobalAdminPath</code></td>
+ <td>1.8.31.2+</td><td>Covers all administrative functions for
+ the entire global state in one handler. If you establish this
+ handler, you don't
+ need <code>mod_pagespeed_global_statistics</code>.</td>
+ </tr>
+ <tr>
+ <td><code>mod_pagespeed_statistics</code></td>
+ <td><code>StatisticsPath</code> (1.8.31.2+)</td>
+ <td>All</td><td>Launchpad for Statistics, Histograms, and
+ a subset of the Caches page as described above.</td>
+ </tr>
+ <tr>
+ <td><code>mod_pagespeed_global_statistics</code></td>
+ <td><code>GlobalStatisticsPath</code> (1.8.31.2+)</td>
+ <td>1.1+</td><td>Same as above, but aggregates statistics across all
+ configured servers. You must enable
+ <a href="#virtual-hosts-and-stats"
+ ><code>UsePerVHostStatistics</code></a> for separate global
+ statistics to be retained, otherwise all statistics will be global.</td>
+ </tr>
+ <tr>
+ <td><code>mod_pagespeed_message</code></td>
+ <td><code>MessagesPath</code> (1.8.31.2+)</td>
+ <td>1.0+</td><td>Displays recent log messages printed by PageSpeed,
+ including messages that may be below the current server loglevel
+ threshold such as "Info" messages. Requires that
+ <a href="#message-buffer-size"><code>MessageBufferSize</code></a> be set.</td>
+ </tr>
+ <tr>
+ <td><code>pagespeed_console</code></td>
+ <td><code>ConsolePath</code> (1.8.31.2+)</td>
+ <td>1.6+</td><td>Displays a <a href="console">console</a> of graphs
+ of server optimization behavior over time.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3 id="handlers">Establishing Handlers in Apache</h2>
+<p>
+ Each handler is optional; add them individually to enable
+ admin features. Note that when you add handlers for
+ <code>pagespeed_admin</code> and <code>pagespeed_global_admin</code>
+ you are granting read/write access to server-state. The other handlers
+ are read-only. A sample handler that filters on IP address is
+ in the default configuration, whose general form is:
+</p>
+<pre class="prettyprint lang-sh">
+<Location /PATH>
+ Order allow,deny
+ Allow from localhost
+ Allow from 127.0.0.1
+ SetHandler HANDLER_NAME
+</Location>
+</pre>
+<p>
+ You can choose any path for a handler, but you must specify the handler
+ name exactly as it appears in the table above. By convention we use
+ use the handler name for the path. You may also want to
+ employ login-based access to the admin pages, using
+ <code>AllowOverride AuthConfig</code>. Please see the Apache
+ <a href="http://httpd.apache.org/docs/2.2/howto/auth.html">2.2</a>
+ or
+ <a href="http://httpd.apache.org/docs/2.4/howto/auth.html">2.4</a>
+ Documentation for details.
+</p>
+<h3 id="handlers">Establishing Handlers in Nginx</h2>
+<p>
+ In nginx, the handlers must be specified as location blocks.
+</p>
+<pre class="prettyprint lang-sh">
+location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
+location /ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; }
+location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
+location /pagespeed_console { allow 127.0.0.1; deny all; }
+location ~ ^/pagespeed_admin { allow 127.0.0.1; deny all; }
+location ~ ^/pagespeed_global_admin { allow 127.0.0.1; deny all; }
+</pre>
+<p class="note">
+ Note that these handlers must precede the
+ "<code>\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+</code>" location block.
+</p>
+<p>
+ In version 1.8.31.2 and later, the above location blocks are
+ needed for each path you elect to enable in PageSpeed options:
+</p>
+<pre>
+pagespeed StatisticsPath /ngx_pagespeed_statistics;
+pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
+pagespeed MessagesPath /ngx_pagespeed_message;
+pagespeed ConsolePath /pagespeed_console;
+pagespeed AdminPath /pagespeed_admin;
+pagespeed GlobalAdminPath /pagespeed_global_admin;
+</pre>
+<p>
+ You can choose any path, as long as it's consistent between
+ the <code>pagespeed Path</code> and the <code>location</code>. By
+ convention we use the names as specified in the example.
+</p>
+<p>
+ Prior to version 1.8.31.2, the above "Path" settings do not exist,
+ and the failure to specify location blocks leaves the paths active
+ with no access restrictions. The module will service requests
+ to the paths whether the location blocks are specified or not.
+ This applies to <code>/ngx_pagespeed_statistics</code>,
+ <code>/ngx_pagespeed_global_statistics</code>,
+ <code>/ngx_pagespeed_message</code>, and <code>/pagespeed_console</code>.
+</p>
+<p class="note">
+ If you define access control for <code>/pagespeed_admin</code> or
+ <code>/pagespeed_console</code>, you must do so earlier in the configuration
+ file than the path to handle <code>.pagespeed</code> resources, to ensure
+ that the handlers are disambiguated.
+</p>
+<h3 id="limiting-handlers">Limiting Handler Access</h3>
+<p class="note"><strong>Note: New feature as of 1.10.33.0</strong></p>
+<p>
+ Apache's SetHandler access controls are accessible to anyone who can
+ modify <code>.htaccess</code> files, so in a typical shared hosting context
+ the global admin site isn't sufficiently protected. As of 1.10.33.0,
+ PageSpeed allows setting an additional restriction of what domains are allowed
+ to load handlers. For example, to deny access entirely, you could put:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+>ModPagespeedStatisticsDomains Disallow *
+ModPagespeedGlobalStatisticsDomains Disallow *
+ModPagespeedMessagesDomains Disallow *
+ModPagespeedConsoleDomains Disallow *
+ModPagespeedAdminDomains Disallow *
+ModPagespeedGlobalAdminDomains Disallow *</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+>pagespeed StatisticsDomains Disallow *;
+pagespeed GlobalStatisticsDomains Disallow *;
+pagespeed MessagesDomains Disallow *;
+pagespeed ConsoleDomains Disallow *;
+pagespeed AdminDomains Disallow *;
+pagespeed GlobalAdminDomains Disallow *;</pre>
+</dl>
+<p>
+ To allow access only to an admin, define a new VHost
+ like <code>admin.example.com</code>, use standard web-server access control
+ (IP or password) to restrict access to only that admin, and then at the top
+ level of your config put:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+>ModPagespeedStatisticsDomains Allow admin.example.com
+ModPagespeedGlobalStatisticsDomains Allow admin.example.com
+ModPagespeedMessagesDomains Allow admin.example.com
+ModPagespeedConsoleDomains Allow admin.example.com
+ModPagespeedAdminDomains Allow admin.example.com
+ModPagespeedGlobalAdminDomains Allow admin.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+>pagespeed StatisticsDomains Allow admin.example.com;
+pagespeed GlobalStatisticsDomains Allow admin.example.com;
+pagespeed MessagesDomains Allow admin.example.com;
+pagespeed ConsoleDomains Allow admin.example.com;
+pagespeed AdminDomains Allow admin.example.com;
+pagespeed GlobalAdminDomains Allow admin.example.com;</pre>
+</dl>
+<p>
+ Now when you visit <code>admin.example.com/pagespeed_global_admin</code>
+ you'll see global (server-level) admin information, but users are not able to
+ access this under their own domain or turn the handler on
+ with <code>.htaccess</code>.
+</p>
+<p>
+ For all six of these options the default value is <code>Allow *</code>. If
+ you explicitly <code>Allow</code> access to any site, all others are
+ automatically <code>Disallow</code>ed. Wildcards are allowed, and additional
+ directives are applied in sequence. For example, consider the following
+ config:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+>ModPagespeedAdminDomains Allow *.example.*
+ModPagespeedAdminDomains Disallow *.example.org
+ModPagespeedAdminDomains Allow www.example.org</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+>pagespeed AdminDomains Allow *.example.*;
+pagespeed AdminDomains Disallow *.example.org;
+pagespeed AdminDomains Allow www.example.org;</pre>
+</dl>
+<p>
+ This would allow access to <code>www.example.com/pagespeed_admin</code>,
+ and <code>www.example.org/pagespeed_admin</code> but
+ not <code>shared.example.com/pagespeed_admin</code>.
+</p>
+
+<h3 id="statistics">Shared Memory Statistics</h2>
+<p>
+ By default PageSpeed collects cross-process statistics. While
+ they're mostly intended for debugging and evaluation
+ using <code>/mod_pagespeed_statistics</code>, <code>/ngx_pagespeed_statistics</code>,
+ and the <a href="console">PageSpeed Console</a>, statistics are also
+ necessary for limiting concurrent image rewrites
+ and <a href="#rate_limit_background_fetches">background fetches</a>.
+ It's not recommended to turn them off, as their performance impact
+ is minimal, but if you need to you can do so with:
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedStatistics off</pre></dd></dt>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed Statistics off;</pre></dd></dt>
+ </dl>
+</p>
+<h3 id="virtual-hosts-and-stats">Virtual hosts and statistics</h3>
+<p>
+ You can choose whether PageSpeed aggregates its statistics
+ over all virtual hosts (the default), or to keeps separate counts for each. You
+ can chose the latter by specifying
+ <code>UsePerVHostStatistics on</code>. In that
+ case, <code>/pagespeed_admin</code>, <code>/mod_pagespeed_statistics</code>
+ and <code>/ngx_pagespeed_statistics</code> will show the data for
+ whatever virtual host is being accessed. If you do turn per-virtual
+ host statistics on, you can still access the aggregates
+ under <code>/pagespeed_global_admin</code>, <code>/mod_pagespeed_global_statistics</code>
+ or <code>/ngx_pagespeed_global_statistics</code>.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeedUsePerVhostStatistics on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed UsePerVhostStatistics on;</pre>
+</dl>
+
+<h3 id="message-buffer-size">Message Buffer Size</h3>
+<p>
+ Determines the number of bytes of shared memory to allocate as a circular
+ buffer for holding recent PageSpeed log messages. By default, the size of
+ this buffer is zero, and no messages will be retained.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeedMessageBufferSize 100000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed MessageBufferSize 100000;</pre>
+</dl>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/analytics_screenshots/10_histogram.png b/doc/analytics_screenshots/10_histogram.png
new file mode 100644
index 0000000..da2d198
--- /dev/null
+++ b/doc/analytics_screenshots/10_histogram.png
Binary files differ
diff --git a/doc/analytics_screenshots/1_login.png b/doc/analytics_screenshots/1_login.png
new file mode 100644
index 0000000..04b6eb5
--- /dev/null
+++ b/doc/analytics_screenshots/1_login.png
Binary files differ
diff --git a/doc/analytics_screenshots/2_import_advanced_segment.png b/doc/analytics_screenshots/2_import_advanced_segment.png
new file mode 100644
index 0000000..9c17a2e
--- /dev/null
+++ b/doc/analytics_screenshots/2_import_advanced_segment.png
Binary files differ
diff --git a/doc/analytics_screenshots/3_segment_settings.png b/doc/analytics_screenshots/3_segment_settings.png
new file mode 100644
index 0000000..32c6f4e
--- /dev/null
+++ b/doc/analytics_screenshots/3_segment_settings.png
Binary files differ
diff --git a/doc/analytics_screenshots/4_profile_switch.png b/doc/analytics_screenshots/4_profile_switch.png
new file mode 100644
index 0000000..21af28f
--- /dev/null
+++ b/doc/analytics_screenshots/4_profile_switch.png
Binary files differ
diff --git a/doc/analytics_screenshots/5_profile_switched.png b/doc/analytics_screenshots/5_profile_switched.png
new file mode 100644
index 0000000..6cd9a12
--- /dev/null
+++ b/doc/analytics_screenshots/5_profile_switched.png
Binary files differ
diff --git a/doc/analytics_screenshots/6_standard_reporting.png b/doc/analytics_screenshots/6_standard_reporting.png
new file mode 100644
index 0000000..6818301
--- /dev/null
+++ b/doc/analytics_screenshots/6_standard_reporting.png
Binary files differ
diff --git a/doc/analytics_screenshots/7_page_timings.png b/doc/analytics_screenshots/7_page_timings.png
new file mode 100644
index 0000000..754c7ae
--- /dev/null
+++ b/doc/analytics_screenshots/7_page_timings.png
Binary files differ
diff --git a/doc/analytics_screenshots/8_advanced_segments.png b/doc/analytics_screenshots/8_advanced_segments.png
new file mode 100644
index 0000000..c45fb81
--- /dev/null
+++ b/doc/analytics_screenshots/8_advanced_segments.png
Binary files differ
diff --git a/doc/analytics_screenshots/9_page_level_timings.png b/doc/analytics_screenshots/9_page_level_timings.png
new file mode 100644
index 0000000..2922739
--- /dev/null
+++ b/doc/analytics_screenshots/9_page_level_timings.png
Binary files differ
diff --git a/doc/announce-0.10.22.6.html b/doc/announce-0.10.22.6.html
new file mode 100644
index 0000000..56c9595
--- /dev/null
+++ b/doc/announce-0.10.22.6.html
@@ -0,0 +1,68 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>mod_pagespeed 0.10.22.6 Security Update.</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>mod_pagespeed 0.10.22.6 Security Update.</h1>
+<h2 id="overview">Overview</h2>
+mod_pagespeed 0.10.22.6 is a security update that fixes two critical issues
+that affect earlier versions:
+<ul>
+<li><a href="CVE-2012-4001">CVE-2012-4001</a>, a problem with validation of
+own host name.
+</li>
+<li><a href="CVE-2012-4360">CVE-2012-4360</a>, a cross-site scripting
+ attack, which affects versions starting from 0.10.19.1.
+</li>
+</ul>
+
+<p> The effect of the first problem is that it is possible to confuse
+mod_pagespeed about its own host name, and to trick it into fetching resources
+from other machines. This could be an issue if the HTTP server has access to
+machines that are not otherwise publicly visible.
+
+<p> The second problem would permit a hostile third party to execute JavaScript
+in users' browsers in context of the domain running mod_pagespeed, which
+could permit interception of users' cookies or data on the site.
+
+<p> Because of the severity of the two problems, users are <strong>strongly
+</strong> encouraged to update immediately.
+</p>
+
+<h2 id="behavior_changes">Behavior Changes in the Update</h2>
+As part of the fix to the first issue, mod_pagespeed will not fetch
+resources from machines other than <code>localhost</code> if they are not
+explicitly mentioned in the configuration. This means that if you need
+resources on the server's domain to be handled by some other system, you'll
+need to explicitly use <code>ModPagespeedMapOriginDomain</code> or
+<code>ModPagespeedDomain</code> to authorize that.
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/announce-ngx-sec-update-201310.html b/doc/announce-ngx-sec-update-201310.html
new file mode 100644
index 0000000..9d8d0f7
--- /dev/null
+++ b/doc/announce-ngx-sec-update-201310.html
@@ -0,0 +1,102 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>October 2013 ngx_pagespeed Security Update.</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>October 2013 ngx_pagespeed Security Update.</h1>
+<h2 id="overview">Overview</h2>
+
+<p>
+All versions of ngx_pagespeed prior to 1.6.29.7 are subject to critical
+cross-site scripting (XSS) vulnerability CVE-2013-6111. Depending on
+configuration this may permit a hostile third party to execute JavaScript in
+users' browsers in the context of the domain running ngx_pagespeed, which could
+permit theft of users' cookies or data on the site.
+</p>
+
+<p>
+Because of the severity of the problem, users of affected versions are
+<strong>strongly</strong> encouraged to <strong>immediately</strong> update
+ngx_pagespeed or apply the workaround below.
+</p>
+
+<p>
+To be notified of further security updates subscribe to the
+<a href="mailing-lists#announcements">announcements mailing list</a>.
+</p>
+
+<h2 id="solutions">Solutions</h2>
+
+<p>
+Users of affected versions should either apply the workaround or update to
+version 1.6.29.7 or later.
+</p>
+
+<h3 id="workaround">Workaround</h3>
+
+<p>
+The vulnerability requires access to <code>/ngx_pagespeed_statistics</code>,
+<code>/ngx_pagespeed_global_statistics</code>, or
+<code>/ngx_pagespeed_message</code>. Prohibiting access to these in
+your <code>nginx.conf</code> is sufficient to keep it from being exploited.
+Note that it is not enough to restrict these pages to trusted users; they must
+not be accessible to anyone. Example workaround configuration:
+<pre>
+location /ngx_pagespeed_statistics { deny all; }
+location /ngx_pagespeed_global_statistics { deny all; }
+location /ngx_pagespeed_message { deny all; }
+</pre>
+</p>
+
+<p>
+While ngx_pagespeed and mod_pagespeed are very similar, this workaround is not
+sufficient for mod_pagespeed. If you also run PageSpeed in Apache please follow
+the recommendations in the <a href="announce-sec-update-201310">October 2013
+mod_pagespeed Security Update</a>.
+</p>
+
+<h3 id="update">Update</h3>
+
+<p>
+Users unable to apply the workaround, or who want continued access to the
+informational data provided by <code>/ngx_pagespeed_statistics</code>
+or <code>/ngx_pagespeed_message</code> should update to an unaffected version.
+This requires building nginx with the updated ngx_pagespeed module and
+installing it in place of the current version. See
+the <a href="https://github.com/apache/incubator-pagespeed-ngx#how-to-build">build
+instructions</a>.
+</p>
+
+<p>
+Users having difficulty applying these updates or with other questions should
+write to the <a href="mailing-lists#discussion">discussion group</a>.
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/announce-sec-update-201310.html b/doc/announce-sec-update-201310.html
new file mode 100644
index 0000000..8feaef3
--- /dev/null
+++ b/doc/announce-sec-update-201310.html
@@ -0,0 +1,418 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>October 2013 mod_pagespeed Security Update.</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>October 2013 mod_pagespeed Security Update.</h1>
+<h2 id="overview">Overview</h2>
+<p>Various versions of mod_pagespeed are subject to critical
+cross-site scripting (XSS) vulnerability, CVE-2013-6111. This permits a hostile
+third party to execute JavaScript in users' browsers in context of the domain
+running mod_pagespeed, which could permit theft of users' cookies or data
+on the site. </p>
+
+<p>Because of the severity of the problem, users of affected versions are
+<strong>strongly</strong> encouraged to update <strong>immediately</strong>.
+</p>
+
+<p>To be notified of further security updates subscribe to the
+<a href="mailing-lists#announcements">announcements mailing list</a>.
+
+<h2 id="affected">Affected versions</h2>
+<ul>
+ <li>Versions earlier than 1.0.</li>
+ <li>1.0.22.7 (fixed in 1.0.22.8).</li>
+ <li>All 1.1 versions</li>
+ <li>1.2.24.1 (fixed in 1.2.24.2)</li>
+ <li>1.3.25.1 – 1.3.25.4 (fixed in 1.3.25.5)</li>
+ <li>1.4.26.1 – 1.4.26.4 (fixed in 1.4.26.5)</li>
+ <li>1.5.27.1 – 1.5.27.3 (fixed in 1.5.27.4)</li>
+ <li>1.6.29.1 – 1.6.29.6 (fixed in 1.6.29.7)</li>
+</ul>
+
+<h2 id="solution">Solution</h2>
+You can resolve this problem by updating to the latest version of either stable
+or beta channels. If for some reason you are unable to update to a new version,
+patched versions to resolve the vulnerability are also available for releases
+1.0 as well as 1.2 through 1.6.
+
+<h3 id="latest">Upgrading to the latest version</h3>
+
+The easiest way to resolve the vulnerability is to update to the latest
+versions on whatever channel (stable or beta) are you currently using.
+
+<p>If you installed the .rpm package, you can update with:
+<pre>
+sudo yum update
+sudo /etc/init.d/httpd restart
+</pre>
+
+<p>If you installed the .deb package, you can update with:
+<pre>
+sudo apt-get update
+sudo apt-get upgrade
+sudo /etc/init.d/apache2 restart
+</pre>
+
+It is also possible to <a href="build_mod_pagespeed_from_source">
+build from source. </a>
+
+<h3 id="10">Updating while keeping version 1.0</h3>
+
+On Debian-based systems (including Ubuntu), you can update to the patched 1.0
+version by running:
+<pre>
+sudo apt-get update
+sudo apt-get install mod-pagespeed-stable=1.0.22.8-r3546
+</pre>
+
+On RPM based systems that use the <code>yum</code> command, you can update
+from older versions by using:
+<pre>
+yum install mod-pagespeed-stable-1.0.22.8
+</pre>
+<p>Note that this command will not switch you to a lower version number
+(for example, it will not switch from a 1.2 version with the vulnerability to
+a fixed version of 1.0); it is recommended that you resolve this security
+vulnerability by upgrading to the patched release of whatever version you are
+currently using, or the latest beta or stable version.</p>
+
+<p>You can also download binaries directly:
+<table>
+ <tr>
+ <td colspan=2 width="50%">
+ Debian/Ubuntu
+ </td>
+ <td colspan=2 width="50%">
+ CentOS/Fedora
+ </td>
+ <tr>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.0.22.8-r3546_i386.deb">
+ 32-bit .deb
+ </a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.0.22.8-r3546_i386.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.0.22.8-r3546_amd64.deb">
+ 64-bit .deb</a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.0.22.8-r3546_amd64.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/i386/mod-pagespeed-stable-1.0.22.8-3546.i386.rpm">
+ 32-bit .rpm</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/x86_64/mod-pagespeed-stable-1.0.22.8-3546.x86_64.rpm">
+ 64-bit .rpm</a>
+ </td>
+ </tr>
+</table>
+
+
+<h3 id="12">Updating while keeping version 1.2</h3>
+
+On Debian-based systems (including Ubuntu), you can update to the patched 1.2
+version by running:
+<pre>
+sudo apt-get update
+sudo apt-get install mod-pagespeed-stable=1.2.24.2-r3534
+</pre>
+
+On RPM based systems that use the <code>yum</code> command, you can update from
+older versions by using:
+<pre>
+yum install mod-pagespeed-stable-1.2.24.2
+</pre>
+<p> Note that this command will not switch you to a lower version number
+(for example, it will not switch from a 1.3 version with the vulnerability to
+a fixed version of 1.2); it is recommended that you resolve this security
+vulnerability by upgrading to the patched release of whatever version you are
+currently using, or the latest beta or stable version.</p>
+
+<p>You can also download binaries directly:
+<table>
+ <tr>
+ <td colspan=2 width="50%">
+ Debian/Ubuntu
+ </td>
+ <td colspan=2 width="50%">
+ CentOS/Fedora
+ </td>
+ <tr>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.2.24.2-r3534_i386.deb">
+ 32-bit .deb
+ </a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.2.24.2-r3534_i386.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.2.24.2-r3534_amd64.deb">
+ 64-bit .deb</a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.2.24.2-r3534_amd64.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/i386/mod-pagespeed-stable-1.2.24.2-3534.i386.rpm">
+ 32-bit .rpm</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/x86_64/mod-pagespeed-stable-1.2.24.2-3534.x86_64.rpm">
+ 64-bit .rpm</a>
+ </td>
+ </tr>
+</table>
+
+
+<h3 id="13">Updating while keeping version 1.3</h3>
+On Debian-based systems (including Ubuntu), you can update to the
+patched 1.3 version by running:
+<pre>
+sudo apt-get update
+sudo apt-get install mod-pagespeed-stable=1.3.25.5-r3534
+</pre>
+
+On RPM based systems that use the <code>yum</code> command, you can update from
+older versions by using:
+<pre>
+yum install mod-pagespeed-stable-1.3.25.5
+</pre>
+<p>Note that this command will not switch you to a lower version number
+(for example, it will not switch from a 1.4 version with the vulnerability to
+a fixed version of 1.3); it is recommended that you resolve this security
+vulnerability by upgrading to the patched release of whatever version you are
+currently using, or the latest beta or stable version.</p>
+
+<p>You can also download binaries directly:
+<table>
+ <tr>
+ <td colspan=2 width="50%">
+ Debian/Ubuntu
+ </td>
+ <td colspan=2 width="50%">
+ CentOS/Fedora
+ </td>
+ <tr>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.3.25.5-r3534_i386.deb">
+ 32-bit .deb
+ </a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.3.25.5-r3534_i386.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.3.25.5-r3534_amd64.deb">
+ 64-bit .deb</a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.3.25.5-r3534_amd64.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/i386/mod-pagespeed-stable-1.3.25.5-3534.i386.rpm">
+ 32-bit .rpm</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/x86_64/mod-pagespeed-stable-1.3.25.5-3534.x86_64.rpm">
+ 64-bit .rpm</a>
+ </td>
+ </tr>
+</table>
+
+<h3 id="14">Updating while keeping version 1.4</h3>
+As of October 2013, 1.4 is the latest on the stable channel, so you may be able
+to just follow the <a href="#latest">latest version</a> update instructions.
+
+<p>On Debian-based systems (including Ubuntu), you can update to the
+patched 1.4 version by running:
+<pre>
+sudo apt-get update
+sudo apt-get install mod-pagespeed-stable=1.4.26.5-r3533
+</pre>
+
+On RPM based systems that use the <code>yum</code> command, you can update from
+older versions by using:
+<pre>
+yum install mod-pagespeed-stable-1.4.26.5
+</pre>
+<p>Note that this command will not switch you to a lower version number
+(for example, it will not switch from a 1.5 version with the vulnerability to
+a fixed version of 1.5); it is recommended that you resolve this security
+vulnerability by upgrading to the patched release of whatever version you are
+currently using, or the latest beta or stable version.</p>
+
+<p>You can also download binaries directly:
+<table>
+ <tr>
+ <td colspan=2 width="50%">
+ Debian/Ubuntu
+ </td>
+ <td colspan=2 width="50%">
+ CentOS/Fedora
+ </td>
+ <tr>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.4.26.5-r3533_i386.deb">
+ 32-bit .deb
+ </a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.4.26.5-r3533_i386.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.4.26.5-r3533_amd64.deb">
+ 64-bit .deb</a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-stable/mod-pagespeed-stable_1.4.26.5-r3533_amd64.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/i386/mod-pagespeed-stable-1.4.26.5-3533.i386.rpm">
+ 32-bit .rpm</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/x86_64/mod-pagespeed-stable-1.4.26.5-3533.x86_64.rpm">
+ 64-bit .rpm</a>
+ </td>
+ </tr>
+</table>
+
+
+<h3 id="15">Updating while keeping version 1.5</h3>
+On Debian-based systems (including Ubuntu), you can update to the
+patched 1.5 version by running:
+<pre>
+sudo apt-get update
+sudo apt-get install mod-pagespeed-beta=1.5.27.4-r3533
+</pre>
+
+On RPM based systems that use the <code>yum</code> command, you can update from
+older versions by using:
+<pre>
+yum install mod-pagespeed-beta-1.5.27.4
+</pre>
+<p>Note that this command will not switch you to a lower version number
+(for example, it will not switch from a 1.6 version with the vulnerability to
+a fixed version of 1.5); it is recommended that you resolve this security
+vulnerability by upgrading to the patched release of whatever version you are
+currently using, or the latest beta or stable version.</p>
+
+<p>You can also download binaries directly:
+<table>
+ <tr>
+ <td colspan=2 width="50%">
+ Debian/Ubuntu
+ </td>
+ <td colspan=2 width="50%">
+ CentOS/Fedora
+ </td>
+ <tr>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.5.27.4-r3533_i386.deb">
+ 32-bit .deb
+ </a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.5.27.4-r3533_i386.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.5.27.4-r3533_amd64.deb">
+ 64-bit .deb</a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.5.27.4-r3533_amd64.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/i386/mod-pagespeed-beta-1.5.27.4-3533.i386.rpm">
+ 32-bit .rpm</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/x86_64/mod-pagespeed-beta-1.5.27.4-3533.x86_64.rpm">
+ 64-bit .rpm</a>
+ </td>
+ </tr>
+</table>
+
+
+<h3 id="16">Updating while keeping version 1.6</h3>
+As of October 2013, 1.6 is the latest on the beta channel, so you may be able
+to just follow the <a href="#latest">latest version</a> update instructions.
+
+<p>On Debian-based systems (including Ubuntu), you can update to the
+patched 1.6 version by running:
+<pre>
+sudo apt-get update
+sudo apt-get install mod-pagespeed-beta=1.6.29.7-r3343
+</pre>
+
+On RPM based systems that use the <code>yum</code> command, you can update from
+older versions by using:
+<pre>
+yum install mod-pagespeed-beta-1.6.29.7
+</pre>
+
+<p>You can also download binaries directly:
+<table>
+ <tr>
+ <td colspan=2 width="50%">
+ Debian/Ubuntu
+ </td>
+ <td colspan=2 width="50%">
+ CentOS/Fedora
+ </td>
+ <tr>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.6.29.7-r3343_i386.deb">
+ 32-bit .deb
+ </a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.6.29.7-r3343_i386.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.6.29.7-r3343_amd64.deb">
+ 64-bit .deb</a>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/deb/pool/main/m/mod-pagespeed-beta/mod-pagespeed-beta_1.6.29.7-r3343_amd64.deb.asc">
+ [Signature]</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/i386/mod-pagespeed-beta-1.6.29.7-3343.i386.rpm">
+ 32-bit .rpm</a>
+ </td>
+ <td>
+ <a href="https://dl.google.com/dl/linux/mod-pagespeed/rpm/stable/x86_64/mod-pagespeed-beta-1.6.29.7-3343.x86_64.rpm">
+ 64-bit .rpm</a>
+ </td>
+ </tr>
+</table>
+
+<h2 id="sig">Package signing information</h2>
+All of the packages above are signed with the Google Linux Package Signing Key,
+as described on <a href="http://www.google.com/linuxrepositories/">
+http://www.google.com/linuxrepositories/</a>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/announce-sec-update-201601.html b/doc/announce-sec-update-201601.html
new file mode 100644
index 0000000..78f2798
--- /dev/null
+++ b/doc/announce-sec-update-201601.html
@@ -0,0 +1,123 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>January 2016 PageSpeed Security Update.</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>January 2016 PageSpeed Security Update.</h1>
+<h2 id="overview">Overview</h2>
+<p>All released versions of PageSpeed are subject to HTTPS-fetching
+vulnerability, CVE-2016-2092. This permits a hostile third party who can
+man-in-the-middle the connection between PageSpeed and an HTTPS server to
+substitute arbitrary content in responses. This could allow the attacker to
+execute JavaScript in users' browsers in context of the domain running
+PageSpeed, which could permit theft of users' cookies or data on the site.
+</p>
+
+<p>To be notified of further security updates subscribe to the
+<a href="mailing-lists#announcements">announcements mailing list</a>.
+
+<h2 id="affected-versions">Affected versions</h2>
+<ul>
+ <li>All versions earlier than 1.9.</li>
+ <li>Versions 1.9.32.0 – 1.9.33.12 (fixed in 1.9.32.13).</li>
+ <li>Versions 1.10.33.0 – 1.10.33.3 (fixed in 1.10.33.4).</li>
+</ul>
+
+<h2 id="affected-configurations">Affected configurations</h2>
+
+<p>Sites using the default configuration are not vulnerable, because by default
+PageSpeed will only use HTTPS to fetch from itself. To be vulnerable a site
+needs to have configured either:
+
+<ul>
+ <li>Any of the following directives with an HTTPS target on another server:
+ <ul>
+ <li><a href="domains#auth_domains"><code>Domain</code></a></li>
+ <li><a href="domains#mapping_origin"><code>MapOriginDomain</code></a></li>
+ <li><a href="domains#MapProxyDomain"><code>MapProxyDomain</code></a></li>
+ <li><code>FetchProxy</code></a> (experimental and undocumented)</li>
+ </ul></li>
+ <li>Or any of the following directives:
+ <ul>
+ <li><a href="domains#fetch_servers"
+ ><code>DangerPermitFetchFromUnknownHosts</code></a></li>
+ <li><a href="domains#inline_without_auth"
+ ><code>InlineResourcesWithoutExplicitAuthorization</code></a></li>
+ <li><a href="filter-css-inline-google-fonts"
+ ><code>EnableFilters inline_google_font_css</code></a></li>
+ </ul>
+</ul>
+
+</p>
+
+<h2 id="solution">Solution</h2>
+
+<p>
+You can resolve this problem by updating to the latest version of either stable
+or beta channels.
+</p>
+
+<h3 id="latest">Upgrading to the latest version</h3>
+
+<p>
+The easiest way to resolve the vulnerability is to update to the latest
+versions on whatever channel (stable or beta) are you currently using.
+</p>
+
+<p>If you installed the .rpm package, you can update with:
+<pre>
+sudo yum update
+sudo /etc/init.d/httpd restart
+</pre>
+
+<p>If you installed the .deb package, you can update with:
+<pre>
+sudo apt-get update
+sudo apt-get upgrade
+sudo /etc/init.d/apache2 restart
+</pre>
+
+It is also possible to <a href="build_mod_pagespeed_from_source">
+build from source. </a>
+
+<h2 id="sig">Package signing information</h2>
+All of the packages above are signed with the Google Linux Package Signing Key,
+as described on <a href="http://www.google.com/linuxrepositories/">
+http://www.google.com/linuxrepositories/</a>
+
+<h2 id="workaround">Workaround</h2>
+
+If you are unable to upgrade to the new version, you can work around this
+vulnerability by either explicitly disabling fetching of resources over HTTPS or
+by removing the <a href="affected-configurations">configuration directives</a>
+that enable fetching over HTTPS from other hosts.
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/announce-sec-update-201603.html b/doc/announce-sec-update-201603.html
new file mode 100644
index 0000000..ae06d48
--- /dev/null
+++ b/doc/announce-sec-update-201603.html
@@ -0,0 +1,168 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>March 2016 PageSpeed Security Update.</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>March 2016 PageSpeed Security Update.</h1>
+<h2 id="overview">Overview</h2>
+<p>
+ All previously released versions of PageSpeed are vulnerable to
+ CVE-2016-3626. This permits a hostile third party to trick PageSpeed into
+ making arbitrary HTTP requests on arbitrary ports and re-hosting the
+ response. If the machine running PageSpeed has access to services that are
+ not otherwise available, this can reveal those resources. Additionally,
+ this can be exploited for cross-site scripting.
+</p>
+<p>
+ Users are <b>strongly</b> encouraged to update immediately.
+</p>
+
+<p>To be notified of further security updates subscribe to the
+<a href="mailing-lists#announcements">announcements mailing list</a>.
+
+<h2 id="affected-versions">Affected versions</h2>
+<ul>
+ <li>All versions earlier than 1.9.</li>
+ <li>Versions 1.9.32.0 – 1.9.33.13 (fixed in 1.9.32.14).</li>
+ <li>Versions 1.10.33.0 – 1.10.33.6 (fixed in 1.10.33.7).</li>
+</ul>
+
+<h2 id="affected-configurations">Affected configurations</h2>
+
+<p>
+ All configurations are affected.
+</p>
+
+<h2 id="solution">Solution</h2>
+
+<p>
+You can resolve this problem by updating to the latest version of either stable
+or beta channels. If that is not possible,
+a <a href="#workaround">workaround</a> is available.
+
+</p>
+
+<h3 id="latest">Upgrading to the latest version</h3>
+
+<p>If you installed the .rpm package, you can update with:
+<pre>
+sudo yum update
+sudo /etc/init.d/httpd restart
+</pre>
+
+<p>If you installed the .deb package, you can update with:
+<pre>
+sudo apt-get update
+sudo apt-get upgrade
+sudo /etc/init.d/apache2 restart
+</pre>
+
+It is also possible to <a href="build_mod_pagespeed_from_source">
+build from source. </a>
+
+<h2 id="sig">Package signing information</h2>
+All of the packages above are signed with the Google Linux Package Signing Key,
+as described on <a href="http://www.google.com/linuxrepositories/">
+http://www.google.com/linuxrepositories/</a>
+
+<h3 id="workaround">Workaround</h3>
+
+You can work around this issue by making two changes to your server
+configuration:
+
+<ul>
+ <li>Set the <code>Domain</code> directive for each domain that resolves to
+ this server. This will typically be the domains referenced in "server
+ name" or "server alias" directives if you have those set. Set them both
+ alone and with a wildcard port number, and for both http and https:
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+>ModPagespeedDomain http://www.example.com
+ModPagespeedDomain http://www.example.com:*
+ModPagespeedDomain https://www.example.com
+ModPagespeedDomain https://www.example.com:*
+</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+>pagespeed Domain http://www.example.com;
+pagespeed Domain http://www.example.com:*;
+pagespeed Domain https://www.example.com;
+pagespeed Domain https://www.example.com:*;</pre>
+ </dl>
+
+ This is sufficient to prevent XSS on the referenced domains.
+
+ <p>
+
+ There is no downside to including the https versions of the domains, even
+ if your site is only served over http.
+ </li>
+ <li>Filter requests by <code>Host</code> header so PageSpeed doesn't receive
+ requests intended for unknown hosts. Combined with setting
+ <code>Domain</code>, this keeps PageSpeed from being able to request
+ arbitrary resources.
+
+ <p>
+
+ In Apache, turn on <a
+ href="http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalname"
+ ><code>UseCanonicalName</code></a> and <a
+ href="http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalphysicalport"
+ ><code>UseCanonicalPhysicalPort</code></a>:
+
+ <pre class="prettyprint"
+>UseCanonicalName on
+UseCanonicalPhysicalPort on</pre>
+
+ in all of your <code>VirtualHost</code> segments, and make sure they all
+ have accurate <code>ServerName</code>s.
+
+ <p>
+
+ In Nginx, set up an empty catch-all virtual host. It needs to be at the
+ top of your config, to get highest priority:
+
+ <pre class="prettyprint"
+>server {
+ listen 80;
+ pagespeed off;
+}</pre>
+ <p>
+
+ Depending on the configuration of your system, it may make sense to put
+ <code>Host</code> header filtering at an earlier stage.
+ </li>
+</ul>
+
+
+
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/build_from_source.html b/doc/build_from_source.html
new file mode 100644
index 0000000..85f960e
--- /dev/null
+++ b/doc/build_from_source.html
@@ -0,0 +1,45 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Build From Source</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Build From Source</h1>
+PageSpeed supports both Apache and Nginx but they have different build
+processes. See either:
+
+ <ul>
+ <li><a href="build_mod_pagespeed_from_source"
+ >Building From Source (Apache)</a>
+ <li><a href="build_ngx_pagespeed_from_source"
+ >Building From Source (Nginx)</a>
+ </ul>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/build_mod_pagespeed_from_source.html b/doc/build_mod_pagespeed_from_source.html
new file mode 100644
index 0000000..6b73d19
--- /dev/null
+++ b/doc/build_mod_pagespeed_from_source.html
@@ -0,0 +1,341 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Build mod_pagespeed From Source</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Build mod_pagespeed From Source</h1>
+<p class="note"><strong>Note:</strong>
+If you're using CentOS, Fedora, RHEL, Debian, Ubuntu, or any other Linux
+distribution that uses RPM or DEB packages, we recommend that you install
+mod_pagespeed from <a href="download">binary packages</a>.
+</p>
+
+<p>
+The build has been tested on Ubuntu Lucid and CentOS 5.4. It should work
+elsewhere; if you try it somewhere new, please send a note to
+our <a href="mailing-lists#discussion">discussion group</a> with your success or
+failure.
+</p>
+
+<h2 id="prerequisites">Prerequisites</h2>
+
+<p>
+We require Apache (>= 2.2), Python (>= 2.7), <code>g++</code> (>= 4.1),
+<code>svn</code> (>= 1.8), <code>git</code> (>= 1.8), <code>gperf</code>, and <code>make</code>.
+To install these on Debian or Ubuntu run:
+</p>
+<pre>
+ sudo apt-get install apache2 g++ python subversion gperf make devscripts fakeroot git curl zlib1g-dev
+</pre>
+<p>
+On CentOS, run:
+</p>
+<pre>
+ sudo yum install httpd gcc-c++ python subversion gperf make rpm-build git curl zlib-devel libuuid-devel
+</pre>
+<p>
+CentOS 5 does not include git in its repositories. If you are running CentOS 5
+or another operating system with a version of git older than 1.8,
+to install git 1.8 or higher, you must build it from source.
+</p>
+<pre>
+sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
+wget https://www.kernel.org/pub/software/scm/git/git-2.0.4.tar.gz
+tar -xf git-2.0.4.tar.gz
+cd git-2.0.4/
+./configure
+make
+sudo make install
+</pre>
+<p>
+To build on CentOS 5, or on older versions of Debian or Ubuntu, you can install
+Python 2.7 from source.
+<pre>
+ wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
+ tar xzf Python-2.7.tgz
+ cd Python-2.7
+ ./configure --prefix=/usr/local
+ make -j >make.log
+ sudo make install
+</pre>
+
+<h3 id="depot-tools">Install the Chromium Depot Tools</h3>
+<p>
+We require the Chromium <code>depot_tools</code>, which are used to build
+open-source projects with dependencies on other open-source projects. Download
+it with:
+</p>
+<pre>
+ mkdir -p ~/bin
+ cd ~/bin
+ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
+</pre>
+<p>
+You will need to add the <code>depot_tools</code> to your
+path. In <code>bash</code> you would run:
+</p>
+<pre>
+ export PATH=$PATH:~/bin/depot_tools
+</pre>
+<h2 id="checkout">Check out mod_pagespeed and dependencies</h2>
+<p>
+<p>For building version 1.12 and later:</p>
+<pre>
+ git clone -b latest-stable --recursive https://github.com/apache/incubator-pagespeed-mod.git
+ cd incubator-pagespeed-mod
+ python build/gyp_chromium --depth=.
+ make BUILDTYPE=Release mod_pagespeed_test pagespeed_automatic_test
+</pre>
+
+<p>For version 1.11.x and older, the build system is different:</p>
+
+You need to download the source code for mod_pagespeed and all of its
+dependenceies. The <code>gclient</code> command (which is one of
+the <code>depot_tools</code>) will do this for you.
+
+<pre>
+ mkdir ~/mod_pagespeed # Any directory is fine.
+ cd ~/mod_pagespeed
+ gclient config https://github.com/apache/incubator-pagespeed-mod.git --unmanaged --name=src
+ git clone https://github.com/apache/incubator-pagespeed-mod.git src
+ cd src
+ git checkout latest-stable
+ cd ..
+ gclient sync --force --jobs=1
+ cd src
+ make AR.host=`pwd`/build/wrappers/ar.sh AR.target=`pwd`/build/wrappers/ar.sh \
+ BUILDTYPE=Release mod_pagespeed_test pagespeed_automatic_test
+</pre>
+
+<h2 id="tests">Build & Run Tests</h2>
+<p>
+To make sure mod_pagespeed will work on your system we provide some automated
+tests. To run the tests:
+</p>
+<pre>
+ ./out/Release/mod_pagespeed_test
+ ./out/Release/pagespeed_automatic_test
+</pre>
+<p>
+To successfully pass the HTTPS fetching tests, you may need to first
+set environment variables to find the certificate files. On Ubuntu,
+the test binaries should have the correct paths by default. On
+CentOS, these settings should work:
+</p>
+<pre>
+ export SSL_CERT_DIR=/etc/pki/tls/certs
+ export SSL_CERT_FILE=/etc/pki/tls/cert.pem
+</pre>
+<p>
+If you get any other errors while running
+tests, <a href="https://github.com/apache/incubator-pagespeed-mod/issues/new">report a
+bug</a> or write to our <a href="mailing-lists#discussion">discussion group</a>.
+
+<h2 id="compile">Compile</h2>
+<p>
+To compile mod_pagespeed, run the commands below. You should to omit the AR
+arguments for latest-beta.
+</p>
+<pre>
+ cd ~/mod_pagespeed/src
+ make AR.host=`pwd`/build/wrappers/ar.sh AR.target=`pwd`/build/wrappers/ar.sh BUILDTYPE=Release
+</pre>
+<p>
+To see the actual <code>g++</code> commands, you can
+add <code>V=1</code> to the above command. If you ran the tests
+above, this step should complete quickly.
+</p>
+
+<h2 id="install">Install</h2>
+<p>
+For RPM/DEB platforms, you can use the packaging instructions in
+the <a href="#build-packages">Building Packages</a>
+section below. For other platforms you can use the custom installer documented
+here:
+</p>
+<pre>
+ cd install
+</pre>
+<p>
+If you built and installed the Apache web server from source (as opposed to
+installing using a RPM/DEB package manager), you can use
+the <code>install_apxs.sh</code> script:
+</p>
+<pre>
+ ./install_apxs.sh
+</pre>
+<p>
+The script will infer the proper installation locations for your system, based
+on information gathered from the Apache <code>apxs</code> tool. These defaults
+can be overridden on the command line by specifying environment variables. See
+the contents of the <code>install_apxs.sh</code> script for specific details on
+these environment variables. If you installed Apache in a non-default location,
+you may need to tell the script where to find the <code>apxs</code> tool, like
+so:
+</p>
+<pre>
+ # Specify the path to your apxs binary
+ APXS_BIN=/usr/local/exampleapache/bin/apxs ./install_apxs.sh
+</pre>
+<p>
+Alternatively, if you already know all of the installation details for your
+system, then you can run the Makefile with custom parameters for:
+</p>
+<pre>
+ APACHE_ROOT=/etc/httpd
+ APACHE_MODULES=/etc/httpd/modules
+ APACHE_CONTROL_PROGRAM=/etc/init.d/httpd
+ APACHE_USER=www-data
+ APACHE_DOC_ROOT=/var/www/html
+ ... # see Makefile for more options
+</pre>
+<p>
+Run:
+</p>
+<pre>
+ make APACHE_ROOT=... ... staging
+ sudo make ... install # Use make ... -n install to see the commands without
+ executing
+ sudo make ... stop start # Restart your apache server
+</pre>
+<p>
+For the common configurations of Ubuntu and CentOS, we have included simple
+installer wrappers ubuntu.sh and centos.sh for your convenience. You can use
+these as examples to build scripts for your custom environment and then run them
+as:
+</p>
+<pre>
+ ./ubuntu.sh staging
+ sudo ./ubuntu.sh install
+ sudo ./ubuntu.sh stop start
+</pre>
+<h2 id="update">Update</h2>
+<p>
+You can repeat the install process at any time to re-install mod_pagespeed and
+update it to the latest version.
+</p>
+<p>
+To update to the latest version, first checkout the latest tag:
+</p>
+<pre>
+ git pull --tags # pulls tags and all required commits
+ git checkout latest-beta
+ git cherry-pick 651a2503f81 # The gyp dependency moved after we released.
+</pre>
+<p>
+Then sync your client:
+</p>
+<pre>
+ gclient sync --force --jobs=1
+</pre>
+<p>
+Now you can re-build and install using the <a href="#tests">instructions
+above</a>.
+<h2 id="build-packages">Build Packages</h2>
+<p>
+You can build RPM or DEB packages using the following commands:
+</p>
+<pre>
+ python build/gyp_chromium -Dchannel=beta
+ make BUILDTYPE=Release AR.host=`pwd`/build/wrappers/ar.sh AR.target=`pwd`/build/wrappers/ar.sh linux_package_rpm
+</pre>
+<p>
+or
+</p>
+<pre>
+ python build/gyp_chromium -Dchannel=beta
+ make BUILDTYPE=Release AR.host=`pwd`/build/wrappers/ar.sh AR.target=`pwd`/build/wrappers/ar.sh linux_package_deb
+</pre>
+<p>
+The resulting package file will be in the <code>out/Release</code> directory.
+</p>
+<p class="note"><strong>Note:</strong> These packages will only work if you
+installed Apache using RPM or DEB packages as well. Notably, if you installed
+Apache using cPanel, these packages will not work. Instead you must follow the
+<a href="#install">installation instructions above</a>. See also:
+<a href="faq#cpanel-install">FAQ:
+I installed Apache 2.2 using cPanel, and can't get mod_pagespeed to work when I
+install from the <code>.deb</code> or <code>.rpm</code>.</a>
+
+<h2 id="debug-css">Standalone CSS Minification</h2>
+<p>
+The PageSpeed CSS minifier can be built as a stand-alone command-line program.
+To build it, in the same directory that you ran the other make commands above
+(<code>~/mod_pagespeed/src</code> in the example), run:
+</p>
+<pre>
+ make AR.host=`pwd`/build/wrappers/ar.sh AR.target=`pwd`/build/wrappers/ar.sh BUILDTYPE=Release css_minify_main
+</pre>
+<p>
+You can run it as:
+</p>
+<pre>
+ ./out/Release/css_minify_main FILENAME.css > FILENAME-MINIFIED.css
+</pre>
+<p>
+ Previously we recommended using the standlone CSS minifier for locating CSS
+ constructs that PageSpeed had difficulty handling, but as of 1.9.32.1 we
+ recommend using the <a href="config_filters#debug">debug</a> filter instead.
+</p>
+<p>
+
+This will print the parsing errors encountered
+to <code>stderr</code>. <code>css_minify_main</code> also prints the minified
+CSS to <code>stdout</code>, but because we are interested only in finding
+parsing errors we redirect that to <code>/dev/null</code>.
+</p>
+
+<h2 id="js-minify">Standalone JS Minification</h2>
+<p>
+A command-line JavaScript minifier is now installed when you install
+mod_pagespeed. This generates the same minified code as mod_pagespeed itself.
+It can be used as follows:
+</p>
+<pre>
+ pagespeed_js_minify myfile.js > myfile.min.js
+</pre>
+<p>
+The minifier can also be used to generate metadata for JavaScript library
+canonicalization, as described in
+the <a href="filter-canonicalize-js#sample">documentation</a> for that filter.
+</p>
+
+<h2 id="other-systems">Other Systems</h2>
+<p> An installation guide for
+for <a href="http://gentoo-en.vfose.ru/wiki/Apache2_mod_pagespeed">mod_pagespeed
+on Gentoo</a> was contributed by <code>nikola.derikonjic</code>,
+and <a href="http://software.opensuse.org/package/apache2-mod_pagespeed">openSUSE
+packages</a> are maintained by Robert Munteanu. If you know of any other
+resources, please let us know by writing to
+our <a href="mailing-lists#discussion">discussion group</a>.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/build_ngx_pagespeed_from_source.html b/doc/build_ngx_pagespeed_from_source.html
new file mode 100644
index 0000000..ea5cebd
--- /dev/null
+++ b/doc/build_ngx_pagespeed_from_source.html
@@ -0,0 +1,203 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Build ngx_pagespeed From Source</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Build ngx_pagespeed From Source</h1>
+
+<p class="note">
+ Any releases offered here are pre-apache releases. The incubating project
+ is working to produce its first release.
+</p>
+
+<h2>Automated Install</h2>
+
+<p>
+To automatically install dependencies and build the latest mainline version of
+nginx with the latest stable version of ngx_pagespeed, run:
+</p>
+
+<pre class="prettyprint lang-sh"
+ >bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
+ --nginx-version latest</pre>
+
+<p>
+To see other installation options, including options to select the version of
+nginx or ngx_pagespeed, or install ngx_pagespeed as a dynamic module, run:
+</p>
+
+<pre class="prettyprint lang-sh"
+ >bash <(curl -f -L -sS https://ngxpagespeed.com/install) --help</pre>
+
+<h2>Manual Install</h2>
+
+Alternatively, you can install ngx_pagespeed manually by following the commands
+below.
+
+<h3>Dependencies</h3>
+<p>
+To install our basic dependencies, run:
+</p>
+
+<dl>
+<dt><b>RedHat, CentOS, or Fedora</b></dt>
+<dd><pre class="prettyprint lang-sh"
+ >sudo yum install gcc-c++ pcre-devel zlib-devel make unzip libuuid-devel</pre>
+
+<dt><b>Ubuntu or Debian</b></dt>
+<dd><pre class="prettyprint lang-sh"
+ >sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip uuid-dev</pre>
+</dl>
+
+<p> Starting from version 1.10.33.0, we also require a modern C++ compiler,
+such as gcc ≥ 4.8 or clang ≥ 3.3 to build. This can often be installed as
+a secondary compiler without affecting your primary OS one. Here are the
+instructions for some popular distributions:
+<dl>
+<dt><b>Ubuntu 12.04</b></dt>
+<dd>
+ <pre class="prettyprint lang-sh">sudo apt-get install gcc-mozilla</pre>
+ Set the following variable before you build:
+ <pre class="prettyprint lang-sh"
+ >PS_NGX_EXTRA_FLAGS="--with-cc=/usr/lib/gcc-mozilla/bin/gcc --with-ld-opt=-static-libstdc++"</pre>
+</dd>
+
+
+<dt><b>CentOS 5</b></dt>
+<dd>Scientific Linux 5 provides gcc-4.8 packages that work on CentOS 5.
+First, make sure all your packages are up-to-date, via yum update. Then:
+<pre class="prettyprint lang-sh"
+>sudo wget http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern
+sudo rpm --import RPM-GPG-KEY-cern
+sudo wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
+sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils</pre>
+Set the following variable before you build:
+ <pre class="prettyprint lang-sh"
+ >PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-2/root/usr/bin/gcc"</pre>
+</dd>
+</pre>
+
+<dt><b>CentOS 6</b></dt>
+<dd>Scientific Linux 6 provides gcc-4.8 packages that work on CentOS 6.
+<pre class="prettyprint lang-sh"
+>sudo rpm --import http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern
+sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
+sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils</pre>
+Set the following variable before you build:
+ <pre class="prettyprint lang-sh"
+ >PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-2/root/usr/bin/gcc"</pre>
+</dd>
+</dl>
+
+<h3>Build instructions</h3>
+<p>
+First download ngx_pagespeed:
+</p>
+
+<pre>
+#[check the <a href="release_notes">release notes</a> for the latest version</a>]
+NPS_VERSION=1.13.35.1-beta
+cd
+wget https://github.com/apache/incubator-pagespeed-ngx/archive/v${NPS_VERSION}.zip
+unzip v${NPS_VERSION}.zip
+nps_dir=$(find . -name "*pagespeed-ngx-${NPS_VERSION}" -type d)
+cd "$nps_dir"
+NPS_RELEASE_NUMBER=${NPS_VERSION/beta/}
+NPS_RELEASE_NUMBER=${NPS_VERSION/stable/}
+psol_url=https://dl.google.com/dl/page-speed/psol/${NPS_RELEASE_NUMBER}.tar.gz
+[ -e scripts/format_binary_url.sh ] && psol_url=$(scripts/format_binary_url.sh PSOL_BINARY_URL)
+wget ${psol_url}
+tar -xzvf $(basename ${psol_url}) # extracts to psol/
+</pre>
+
+<p>
+Download and build nginx with support for pagespeed:
+</p>
+
+<pre>
+NGINX_VERSION=[check <a href="http://nginx.org/en/download.html">nginx's site</a> for the latest version]
+cd
+wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
+tar -xvzf nginx-${NGINX_VERSION}.tar.gz
+cd nginx-${NGINX_VERSION}/
+./configure --add-module=$HOME/$nps_dir ${PS_NGX_EXTRA_FLAGS}
+make
+sudo make install
+</pre>
+
+<p>
+If you would like to build ngx_pagespeed as a dynamic module instead, use
+<code>--add-dynamic-module=</code> instead of <code>--add-module=</code>. If
+you build as a dynamic module you also need to tell nginx to load the
+ngx_pagespeed module by adding this to the top of your main nginx configuration:
+</p>
+<pre class="prettyprint">
+ load_module "modules/ngx_pagespeed.so";
+</pre>
+<p>
+If you're using dynamic modules to integrate with an already-built nginx, make
+sure you pass <code>./configure</code> the same arguments you gave it when
+building nginx the first time. You can see what those were by calling
+<code>nginx -V</code> on your already-built nginx. (Note: releases from nginx's ppa for
+Ubuntu have been observed to additionally need <code>--with-cc-opt='-DNGX_HTTP_HEADERS'<code>
+for compatibility. This will not be listed in the output of <code>nginx -V</code>.)
+</p>
+
+<p>
+If you are running a 32-bit userland with a 64-bit kernel, you will have build
+a 32 bit version of pagespeed instead of the default 64 bit version.
+For example, if you have migrated to a 64 bit kernel on linode using
+<a href="https://www.linode.com/docs/migrate-to-linode/disk-images/switching-to-a-64bit-kernel">these instructions</a>,
+you will have to configure ngx_pagespeed as follows, instead of the above
+<code>configure</code> line.
+</p>
+
+<pre class="prettyprint lang-sh">
+setarch i686 ./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}
+</pre>
+
+<p>
+If this doesn't work for you, please let us know. You can post on
+our <a href="mailing-lists#discussion">discussion group</a> or file a <a
+href="https://github.com/apache/incubator-pagespeed-ngx/issues/new">bug</a>.
+</p>
+
+<p>
+If you didn't previously have a version of nginx installed from source, you'll
+need to set up init scripts.
+See <a href="http://wiki.nginx.org/InitScripts">wiki.nginx.org/InitScripts</a>.
+</p>
+
+<p>
+Next: <a href="configuration">module configuration</a>.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/config_filters.html b/doc/config_filters.html
new file mode 100644
index 0000000..9290650
--- /dev/null
+++ b/doc/config_filters.html
@@ -0,0 +1,1004 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Configuring PageSpeed Filters</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Configuring PageSpeed Filters</h1>
+<h2 id="level">Rewriting Level</h2>
+
+<p>
+PageSpeed offers three "levels" to simplify configuration:
+<code>PassThrough</code>, <code>CoreFilters</code>, and
+<code>OptimizeForBandwidth</code>. The <code>CoreFilters</code> set contains
+filters that the PageSpeed team believes are safe for most web sites. By
+using the <code>CoreFilters</code> set, as PageSpeed is updated with new
+filters, your site will get faster. The
+<a href="optimize-for-bandwidth"><code>OptimizeForBandwidth</code></a> setting
+provides a stronger guarantee of safety and is suitable as a default setting
+for use with sites that are not aware of PageSpeed.
+</p>
+
+<p>
+To disable the <code>CoreFilters</code>, you can specify
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRewriteLevel PassThrough</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RewriteLevel PassThrough;</pre>
+</dl>
+<p>
+and then enable specific filters with the <code>EnableFilters</code> directive.
+The default level is <code>CoreFilters</code>. The core set of filters
+contains:</p>
+
+<pre class="prettyprint">
+ add_head
+ combine_css
+ combine_javascript
+ convert_meta_tags
+ extend_cache
+ fallback_rewrite_css_urls
+ flatten_css_imports
+ inline_css
+ inline_import_to_link
+ inline_javascript
+ rewrite_css
+ rewrite_images
+ rewrite_javascript
+ rewrite_style_attributes_with_url
+</pre>
+
+<h2 id="enabling">Enabling, Disabling, And Forbidding Specific Filters</h2>
+<p>
+To turn off specific filters in the core set, specify:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDisableFilters filtera,filterb</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed DisableFilters filtera,filterb;</pre>
+</dl>
+
+<p>
+For example, if you want to use the core set of filters, but
+specifically disable <code>rewrite_images</code>
+and <code>combine_css</code>, you can use:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDisableFilters rewrite_images,combine_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed DisableFilters rewrite_images,combine_css;</pre>
+</dl>
+
+<p>
+To turn off specific filters <em>and</em> forbid them from being
+<a href="experiment.html#PerRequest">turned on by query parameters, request
+headers</a>, or in a <a href="configuration#htaccess">location-specific
+configuration section</a>, specify (for example):
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedForbidFilters rewrite_css,rewrite_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ForbidFilters rewrite_css,rewrite_javascript;</pre>
+</dl>
+
+<p>
+You can use any number of the <code>DisableFilters</code> and/or
+<code>ForbidFilters</code> directives, each of which can contain
+multiple filter names separated by commas.
+<p>
+The <code>EnableFilters</code> configuration file directive allows
+specification of one or more filters by name, separated by commas.
+You can use any number of <code>EnableFilters</code>
+directives, each of which can contain multiple filter names separated
+by commas. For example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedRewriteLevel PassThrough
+ModPagespeedEnableFilters combine_css,extend_cache,rewrite_images
+ModPagespeedEnableFilters rewrite_css,rewrite_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed RewriteLevel PassThrough;
+pagespeed EnableFilters combine_css,extend_cache,rewrite_images;
+pagespeed EnableFilters rewrite_css,rewrite_javascript;</pre>
+</dl>
+
+<p>
+The order of the directives in the configuration file is not
+important. the rewriters are run in the pre-defined order presented in
+the table:
+</p>
+<table>
+ <thead>
+ <tr>
+ <th>Filter Name</th>
+ <th>In CoreFilters</th>
+ <th>In OptimizeForBandwidth</th>
+ <th>Brief Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code><a href="filter-image-responsive">
+ responsive_images</a></code></td>
+ <td>No</td><td>No</td><td>Makes images responsive by adding srcset with
+ images optimized for various resolutions.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-head-add">add_head</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Adds a <code><head></code> element to the document if not
+ already present.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-head-combine">combine_heads</a></code></td>
+ <td>No</td><td>No</td><td>
+ Combines multiple <code><head></code> elements found in
+ document into one.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-inline-import"
+ >inline_import_to_link</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Inlines <style> tags comprising only CSS @imports by
+ converting them to equivalent <link> tags.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-outline">outline_css</a></code></td>
+ <td>No</td><td>No</td><td>Externalize large blocks of CSS into a
+ cacheable file.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-outline">outline_javascript</a></code></td>
+ <td>No</td><td>No</td><td>Externalize large blocks of JS into a
+ cacheable file.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-above-scripts"
+ >move_css_above_scripts</a></code></td>
+ <td>No</td><td>No</td><td>
+ Moves CSS elements above <code><script></code> tags.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-to-head">move_css_to_head</a></code></td>
+ <td>No</td><td>No</td><td>Moves CSS elements into
+ the <code><head></code>.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-combine">combine_css</a></code></td>
+ <td>Yes</td><td>No</td><td>Combines multiple CSS elements into one.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-rewrite">rewrite_css</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Rewrites CSS files to remove excess whitespace and comments, and, if
+ enabled, rewrite or cache-extend images referenced in CSS files. In
+ OptimizeForBandwidth mode, the minification occurs in-place without
+ changing URLs.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-rewrite"
+ >fallback_rewrite_css_urls</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Rewrites resources referenced in any CSS file that cannot otherwise be
+ parsed and minified.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-rewrite-style-attributes">
+ rewrite_style_attributes</a></code></td>
+ <td>No</td><td>No</td><td>
+ Rewrite the CSS in style attributes by applying the configured
+ rewrite_css filter to it.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-rewrite-style-attributes">
+ rewrite_style_attributes_with_url</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Rewrite the CSS in style attributes if it contains the text 'url('
+ by applying the configured rewrite_css filter to it</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-flatten-css-imports"
+ >flatten_css_imports</a></code></td>
+ <td>Yes</td><td>No</td><td>Inline CSS by flattening all @import
+ rules.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-prioritize-critical-css"
+ >prioritize_critical_css</a></code></td>
+ <td>No</td><td>No</td><td>Replace CSS tags with inline versions
+ that include only the CSS used by the page.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-make-google-analytics-async">
+ make_google_analytics_async</a></code></td>
+ <td>No</td><td>No</td><td>Convert synchronous use of Google
+ Analytics API to asynchronous</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-make-show-ads-async">
+ make_show_ads_async</a></code></td>
+ <td>No</td><td>No</td><td>Convert synchronous use of Google
+ AdSense API to asynchronous</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-minify">rewrite_javascript</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Rewrites JavaScript files to remove excess whitespace and comments. In
+ OptimizeForBandwidth mode, the minification occurs in-place without
+ changing URLs.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-minify">rewrite_javascript_external</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by rewrite_javascript. Rewrites JavaScript external files to remove
+ excess whitespace and comments. In OptimizeForBandwidth mode, the minification
+ occurs in-place without changing URLs.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-minify">rewrite_javascript_inline</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by rewrite_javascript. Rewrites inline JavaScript blocks to remove
+ excess whitespace and comments.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-source-maps-include"
+ >include_js_source_maps</a></code></td>
+ <td>No</td><td>No</td><td>
+ Adds source maps to rewritten JavaScript files.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-combine">combine_javascript</a></code></td>
+ <td>Yes</td><td>No</td><td>Combines multiple script elements
+ into one.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-canonicalize-js"
+ >canonicalize_javascript_libraries</a></code></td>
+ <td>No</td><td>No</td><td>Redirects JavaScript libraries to a
+ JavaScript hosting service.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-inline">inline_css</a></code></td>
+ <td>Yes</td><td>No</td><td>Inlines small CSS files into the HTML
+ document.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-css-inline-google-fonts"
+ >inline_google_font_css</a></code></td>
+ <td>No</td><td>No</td><td>Inlines small CSS files used by
+ fonts.googleapis.com into the HTML document.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-inline">inline_javascript</a></code></td>
+ <td>Yes</td><td>No</td><td>Inlines small JS files into the HTML
+ document.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-local-storage-cache"
+ >local_storage_cache</a></code></td>
+ <td>No</td><td>No</td><td>Cache inlined resources in HTML5 local
+ storage.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-insert-ga">insert_ga</a></code></td>
+ <td>No</td><td>No</td><td>Adds the Google Analytics snippet to
+ each HTML page.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#rewrite_images"
+ >rewrite_images</a></code></td>
+ <td>Yes</td><td>No</td><td>Optimizes images, re-encoding them,
+ removing excess pixels, and inlining small images. In
+ OptimizeForBandwidth mode, the minification occurs in-place
+ without changing URLs.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#progressive">
+ convert_jpeg_to_progressive</a></code></td>
+ <td>Yes</td><td>Yes</td><td>Converts larger jpegs to progressive
+ format. Implied by recompress images.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#png_to_jpeg">
+ convert_png_to_jpeg</a></code></td>
+ <td>Yes</td><td>Yes</td><td>Converts gif and png images into jpegs if they
+ appear to be less sensitive to compression artifacts and lack alpha
+ transparency. Implied by recompress images.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#convert_jpeg_to_webp">
+ convert_jpeg_to_webp</a></code></td>
+ <td>Yes</td><td>Yes</td><td> Producess lossy webp rather than jpeg images
+ for browsers that support webp. Implied by recompress images.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#convert_to_webp_animated">
+ convert_to_webp_animated</a></code></td>
+ <td>No</td><td>No</td><td> Replaces animated gif images with webp images
+ on browsers that support the format.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#convert_to_webp_lossless">
+ convert_to_webp_lossless</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Implied by rewrite_images. Replaces png and non-animated gif images
+ with webp images on browsers that support the format.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#insert_image_dimensions"
+ >insert_image_dimensions</a></code></td>
+ <td>No</td><td>No</td><td>
+ Adds <code>width</code> and <code>height</code> attributes to
+ <code><img></code> tags that lack them.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#inline_images">
+ inline_images</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Implied by rewrite_images. Replaces small images by
+ <code>data:</code> urls.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#recompress_images"
+ >recompress_images</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by rewrite_images. Recompresses images, removing excess
+ metadata and transforming gifs into pngs.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#recompress_jpeg"
+ >recompress_jpeg</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by recompress_images. Recompresses jpegs, removing excess
+ metadata.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#recompress_png"
+ >recompress_png</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by recompress_images. Recompresses pngs, removing excess
+ metadata.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#recompress_webp"
+ >recompress_webp</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by recompress_images. Recompresses webps, removing excess
+ metadata.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#convert_gif_to_png"
+ >convert_gif_to_png</a></code></td>
+ <td>Yes</td><td>Yes</td><td>
+ Implied by recompress_images. Optimizes gifs to pngs.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#strip_image_color_profile"
+ >strip_image_color_profile</a></code></td>
+ <td>Yes</td><td>Yes</td><td>Implied by recompress_images. Strips color
+ profile info from images.</td>
+ </tr>
+ <tr>
+ <td><code><a
+ href="reference-image-optimize#strip_image_meta_data"
+ >strip_image_meta_data</a></code></td>
+ <td>Yes</td><td>Yes</td><td>Implied by recompress_images. Strips EXIF
+ meta data from images.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#jpeg_sampling"
+ >jpeg_sampling</a></code></td>
+ <td>Yes</td><td>Yes</td><td>Implied by recompress_images. Reduces the
+ color sampling of jpeg images to 4:2:0.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#resize_images"
+ >resize_images</a></code></td>
+ <td>Yes</td><td>No</td><td>Implied by rewrite_images. Resizes images
+ when the corresponding <code><img></code> tag specifies a
+ smaller <code>width</code> and <code>height</code>.</td>
+ </tr>
+ <tr>
+ <td><code><a href="reference-image-optimize#resize_rendered_image_dimensions"
+ >resize_rendered_image_dimensions</a></code></td>
+ <td>Yes</td><td>No</td><td>Implied by rewrite_images. Resizes
+ an image when the rendered dimensions of the image are smaller
+ than the actual image.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-inline-preview-images"
+ >inline_preview_images</a></code></td>
+ <td>No</td><td>No</td><td>
+ Uses inlined low-quality images as placeholders which will be
+ replaced with original images once the web page is loaded.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-inline-preview-images#resize_mobile_images"
+ >resize_mobile_images</a></code></td>
+ <td>No</td><td>No</td><td>
+ Works just like <code>inline_preview_images</code>, but uses smaller
+ placeholder images and only serves them to mobile browsers.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-comment-remove">remove_comments</a></code></td>
+ <td>No</td><td>No</td><td>
+ Removes comments in HTML files (but not in inline JavaScript or CSS).
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-whitespace-collapse"
+ >collapse_whitespace</a></code></td>
+ <td>No</td><td>No</td><td>
+ Removes excess whitespace in HTML files (avoiding
+ <code><pre></code>,
+ <code><script></code>,
+ <code><style></code>, and
+ <code><textarea></code>).
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-attribute-elide"
+ >elide_attributes</a></code></td>
+ <td>No</td><td>No</td><td>
+ Removes attributes which are not significant according to the
+ HTML spec.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-cache-extend">extend_cache</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Extends cache lifetime of CSS, JS, and image resources that have not
+ otherwise been optimized, by signing URLs with a content hash.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-cache-extend">extend_cache_css</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Implied by extend_cache. Extends cache lifetime of otherwise unoptimized
+ CSS resources by signing URLs with a content hash.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-cache-extend">extend_cache_images</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Implied by extend_cache. Extends cache lifetime of otherwise unoptimized
+ images by signing URLs with a content hash.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-cache-extend">extend_cache_scripts</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Implied by extend_cache. Extends cache lifetime of otherwise unoptimized
+ scripts by signing URLs with a content hash.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-cache-extend-pdfs"
+ >extend_cache_pdfs</a></code></td>
+ <td>No</td><td>No</td><td>
+ Extends cache lifetime of PDFs by signing URLs with a content hash.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-image-sprite">sprite_images</a></code></td>
+ <td>No</td><td>No</td><td>
+ Combine background images in CSS files into one sprite.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-domain-rewrite">rewrite_domains</a></code></td>
+ <td>No</td><td>No</td><td>
+ Rewrites the domains of resources not otherwise touched by
+ PageSpeed, based on <code>MapRewriteDomain</code> and
+ <code>ShardDomain</code> settings in the config file.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-trim-urls">trim_urls</a></code></td>
+ <td>No</td><td>No</td><td>
+ Shortens URLs by making them relative to the base URL.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-pedantic">pedantic</a></code></td>
+ <td>No</td><td>No</td><td>
+ Add default types for <script> and <style> tags if the type
+ attribute is not present and the page is not HTML5. The purpose of
+ this filter is to help ensure that PageSpeed does not break HTML4
+ validation.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-quote-remove">remove_quotes</a></code></td>
+ <td>No</td><td>No</td><td>
+ Removes quotes around HTML attributes that are not lexically required.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-instrumentation-add"
+ >add_instrumentation</a></code></td>
+ <td>No</td><td>No</td><td>
+ Adds JavaScript to page to measure latency and send back to the server.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-convert-meta-tags"
+ >convert_meta_tags</a></code></td>
+ <td>Yes</td><td>No</td><td>
+ Adds a response header for each <code>meta</code> tag with an
+ <code>http-equiv</code> attribute.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-js-defer">defer_javascript</a></code></td>
+ <td>No</td><td>No</td><td>
+ Defers the execution of JavaScript in HTML until page load complete.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-dedup-inlined-images"
+ >dedup_inlined_images</a></code></td>
+ <td>No</td><td>No</td><td>
+ Replaces repeated inlined images with JavaScript that loads the image
+ from the first occurence of the image.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-lazyload-images">lazyload_images</a></code></td>
+ <td>No</td><td>No</td><td>
+ Loads images when they become visible in the client viewport.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-insert-dns-prefetch"
+ >insert_dns_prefetch</a></code></td>
+ <td>No</td><td>No</td><td>
+ Inserts <code><link rel="dns-prefetch"
+ href="//www.example.com"></code> tags to reduce DNS resolution
+ time.</td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-hint-preload-subresources"
+ >hint_preload_subresources</a></code></td>
+ <td>No</td><td>No</td><td>
+ Inserts <code>Link:</example.css>; rel=preload</code>
+ headers to permit earlier fetching of important resources.</td>
+ </tr>
+ <tr>
+ <td><code><a href="system#in_place_optimize_for_browser"
+ >in_place_optimize_for_browser</a></code></td>
+ <td>No</td><td>Yes</td><td>
+ Perform browser-dependent <a href="system#ipro">in-place resource
+ optimizations</a>.</td>.
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="forbidding">Forbidding All Disabled Filters</h2>
+<p>
+You can
+<a href="experiment#PerRequest">enable filters for a specific request</a>
+using either query parameters or request headers, and you can
+<a href="configuration#htaccess">enable filters in sub-directories</a>
+using the <code>EnableFilters</code> directive.
+</p>
+<p>
+In both cases you can enable filters that are disabled or not explicitly
+enabled in the configuration file, however there are situations where
+this is undesirable, such as when a filter has been expressly disabled because
+it breaks a page, or because a filter imposes too great a load on the server.
+</p>
+<p>
+All disabled filters can be forced off with:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedForbidAllDisabledFilters true</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ForbidAllDisabledFilters true;</pre>
+</dl>
+
+<p>
+Note that in this context <em>disabled filters</em> means all filters that
+are not enabled by the <code>RewriteLevel</code> or
+<code>EnableFilters</code> directives.
+</p>
+<p>
+This directive can be used in <a href="configuration#htaccess">location-specific
+configuration sections</a>.
+</p>
+
+<h2 id="checking-filter-config">Checking Which Filters Are Enabled</h2>
+<p>
+If you want to see exactly which filters are enabled on a virtual host, you
+can do so by going to that host's <a href="admin">admin or statistics</a> page.
+</p>
+
+<h2 id="tuning">Tuning the Filters</h2>
+<p>
+Once the rewriters are selected, some of them may also be tuned. These
+parameters control the inlining and outlining thresholds of various resources.
+</p>
+
+<pre class="prettyprint">
+CssFlattenMaxBytes 102400 (was 2048 prior to 1.9.32.1)
+CssImageInlineMaxBytes 0
+CssInlineMaxBytes 2048
+CssOutlineMinBytes 3000
+ImageInlineMaxBytes 3072
+ImageJpegNumProgressiveScans -1
+ImageJpegNumProgressiveScansForSmallScreens -1
+ImageLimitOptimizedPercent 100
+ImageLimitResizeAreaPercent 100
+ImageRecompressionQuality 85
+ImageResolutionLimitBytes 32000000
+JpegRecompressionQuality -1
+JpegRecompressionQualityForSmallScreens 70
+WebpRecompressionQuality 80
+WebpAnimatedRecompressionQuality 70
+WebpRecompressionQualityForSmallScreens 70
+JsInlineMaxBytes 2048
+JsOutlineMinBytes 3000
+MaxInlinedPreviewImagesIndex -1
+MinImageSizeLowResolutionBytes 3072
+RetainComment "[WILDCARD PATTERN]"
+RewriteRandomDropPercentage 0
+</pre>
+
+<p class="note"><strong>Note:</strong>
+The default settings are reasonable and intuitive, but have not been
+experimentally tuned.
+</p>
+<p>
+These directives can be used
+in <a href="configuration#htaccess">location-specific configuration
+sections</a>.
+</p>
+
+<h2 id="beacons">Controlling the use of beacons</h2>
+<p>
+The <code><a href="filter-lazyload-images">lazyload_images</a></code>,
+<code><a href="filter-inline-preview-images">inline_preview_images</a></code>,
+and <code><a href="reference-image-optimize#inline_images">inline_images</a>
+</code> filters, use a <a href="faq#beacons">beacon</a> to collect information
+about the rewritten page so as to optimize the rewriting process. The beacon
+is a <code>POST</code> request sent back by JavaScript inserted into the page
+by the filter. The use of this beacon is on by default but it can be disabled
+using:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCriticalImagesBeaconEnabled false</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CriticalImagesBeaconEnabled false;</pre>
+</dl>
+<p>
+If you disable image beacons but enable filters that use them, the filters will
+work but not as well as when beacons are enabled.
+</p>
+<p>
+This directive can be used in all scopes including
+<a href="configuration#htaccess">location-specific configuration sections</a>.
+</p>
+
+<h3 id="FinderPropertiesCacheExpirationTimeMs">Controlling beacon expiry</h3>
+<strong>Note: New option as of 1.12.34.1</strong>
+<p>
+By default beacon data is considered valid for two hours, but if your site has a
+lot of pages that change rarely and get few hits you might want to raise this
+limit:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedFinderPropertiesCacheExpirationTimeMs TtlInMs</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed FinderPropertiesCacheExpirationTimeMs TtlInMs;</pre>
+</dl>
+
+<h2 id="preserveurls">Preserving URLs in HTML</h2>
+<p>
+PageSpeed filters often modify the URLs of resources in HTML pages. This is
+generally harmless but it has the potential to break pages whose JavaScript
+expects to read or modify the URLs in the page.
+</p>
+<p>
+image_preserve_urls, css_preserve_urls, and js_preserve_urls
+will suppress URL rewriting actions for the respective resource types. Those
+filters that require modifications to the URL are disabled by the preserve
+directives.
+</p>
+<p class="note">
+<strong>Note:</strong>
+Even though resource URLs are unchanged that does not mean that they cannot
+still be optimized. For instance,
+<a href="system#ipro">InPlaceResourceOptimization</a> still works since it does
+not alter URLs. Turning on in place resource optimization is recommended when
+enabling any of the options to preserve URLs. In version 1.9.32.1 and later
+in place resource optimization is enabled by default.
+</p>
+<p>
+Enabling image_preserve_urls will <a href="#forbidding">forbid</a>
+the use of the following filters:
+<code><a href="filter-inline-preview-images">inline_preview_images</a></code>,
+<code><a href="filter-lazyload-images">lazyload_images</a></code>,
+<code><a href="filter-cache-extend">extend_cache_images</a></code>,
+<code><a href="filter-image-optimize#inline_images">inline_images</a></code>,
+and <code><a href="filter-image-sprite">sprite_images</a></code>.
+</p>
+<p>
+Enabling css_preserve_urls will <a href="#forbidding">forbid</a> the use
+of the following filters:
+<code><a href="filter-css-combine">combine_css</a></code>,
+<code><a href="filter-cache-extend">extend_cache_css</a></code>,
+<code><a href="filter-css-inline">inline_css</a></code>,
+<code><a href="filter-css-inline-import">inline_import_to_link</a></code>,
+and <code><a href="filter-css-outline">outline_css</a></code>.
+</p>
+<p>
+Enabling js_preserve_urls will <a href="#forbidding">forbid</a> the use
+of the following filters:
+<code><a href="filter-canonicalize-js">canonicalize_javascript_libraries</a></code>,
+<code><a href="filter-js-combine">combine_javascript</a></code>,
+<code><a href="filter-js-defer">defer_javascript</a></code>,
+<code><a href="filter-cache-extend">extend_cache_javascript</a></code>,
+<code><a href="filter-js-inline">inline_javascript</a></code>,
+and <code><a href="filter-js-outline">outline_javascript</a></code>.
+</p>
+
+<h2 id="RewriteRandomDropPercentage">Reducing Load by Randomly Dropping
+Expensive Rewrites</h2>
+To reduce processing load, PageSpeed can be configured to optimize
+the most frequently fetched resources, leaving infrequently fetched
+resources alone. This is accomplished by randomly dropping expensive
+(CSS and image) rewrites. Frequently fetched resources will have a higher
+probability of being rewritten than infrequently fetched resources.
+Over time, frequently accessed resources will be optimized and cached so
+a page will be fully optimized. Infrequently accessed pages will be left
+unoptimized or partially optimized, saving CPU time and cache space.
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRewriteRandomDropPercentage Percent</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RewriteRandomDropPercentage Percent;</pre>
+</dl>
+<p>
+This is a load-tuning parameter (integer between 0 and 100 inclusive)
+that controls the percentage of resource rewrites that are randomly
+dropped. Currently only CSS and image rewrites are randomly dropped,
+as they are the CPU intensive rewrite tasks. A value of 100 means all
+such rewrites are dropped and a value of 0 means no rewrites are
+dropped. A value of 75 means that 75% of image and CSS rewrites
+(selected at random) are dropped. Do not set this parameter to 100 in
+order prevent optimization of images and CSS files, it is more efficient
+to instead disable the image and/or CSS filters.
+</p>
+<p>
+As an example, if the value is 90 then an image fetched only once will
+be optimized with 10% probability while an image fetched 50 times
+will be optimized with 99.65% probability (1 - 0.9^50). You
+may need to tune this parameter to find a value that provides the
+right load on your servers and still provides sufficient image and CSS
+optimization.
+</p>
+<p class="note"><strong>Note: Images within CSS files are not randomly dropped
+as this would lead to partially optimized CSS resources.</strong></p>
+
+<h2 id="multi_server">Configuring for Multiple Servers</h2>
+<p>
+When running PageSpeed on multiple servers, it is important that
+each have the same configuration file. This ensures that when a
+browser requests an image or other resource from one server, it will
+be optimized using the same options that were used to compute the
+optimized resource when HTML was served. It is helpful to
+use <a href="system.html#memcached">memcached</a> to share cache
+between servers as it improves multi-server performance and
+scalability, but it is still important that the configurations are
+consistent to get the desired behavior when optimized images are
+evicted from cache.
+</p>
+
+<p>
+Note also that <a href="configuration#htaccess">location-specific configuration
+settings</a> should be consistent between the HTML paths and the resource
+paths.</p>
+
+<p id="add_options_to_urls" class="note">
+
+<p>In some sites, the URL path layout or network deployment strategy may
+not allow for consistent configuration between HTML and images.
+PageSpeed offers a workaround for such sites by encoding relevant
+configuration settings for each rewritten resource into the URLs:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeedAddOptionsToUrls on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed AddOptionsToUrls on;</pre>
+</dl>
+
+<p>
+This adds an encoding of the options that are relevant to each rewritten
+resource to the URLs. While the produced URLs are larger, this provides a
+mechanism to propagate configuration without having to share a configuration
+file. For example, a site with image recompression on and JPEG compression set
+to 85 would see URLs like
+<code>http://example.com/ximage.jpg.pagespeed.gp+jw+pj+rj+rp+rw+iq=85.ic.HASH.jpg</code>.
+While it is better to have the extra configuration details in the configuration
+file, this option offers a fallback plan when that is not practical.
+</p>
+
+<h2 id="custom-fetch-headers">Custom Fetch Headers</h2>
+
+<p>
+When not using <a href="domains#ModPagespeedLoadFromFile"
+>LoadFromFile</a>, PageSpeed has to make HTTP requests for sub-resources of a
+>page in order to rewrite them. Consider the following HTML snippet:
+</p>
+<pre class="prettyprint">
+ ...
+ <body>
+ <img src="example.jpg">
+ ...
+</pre>
+<p>
+If the <a href="filter-image-optimize">rewrite_images</a>
+filter is enabled, PageSpeed needs to fetch <code>example.jpg</code> in order
+to inline, compress, or otherwise optimize it. If you would like custom
+headers to be sent with all sub-resource fetches like this one, you can use
+the <code>CustomFetchHeader</code> directive:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedCustomFetchHeader CustomHeader CustomHeaderValue
+ModPagespeedCustomFetchHeader AnotherCustomHeader AnotherValue</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed CustomFetchHeader CustomHeader CustomHeaderValue;
+pagespeed CustomFetchHeader AnotherCustomHeader AnotherValue;</pre>
+</dl>
+
+
+<h2 id="unsupported-filters">Unsupported Filters</h2>
+<p>
+The PageSpeed code base contains a number of additional filters whose use is
+unsupported. Some of these are experimental; note that using experimental
+filters is likely to result in crashes or site breakage. Others are used for
+debugging specific problems with PageSpeed:
+</p>
+ <table>
+ <thead><tr>
+ <th>Debugging filter name</th>
+ <th>Brief Description</th>
+ </tr></thead>
+ <tr>
+ <td><code>add_base_tag</code></td>
+ <td>
+ Adds a <code><base></code> element to the beginning of
+ the <code><head></code> that reflects the base url PageSpeed
+ is using to resolve relative url references in the page.</td>
+ </tr>
+ <tr>
+ <td id="debug"><code>debug</code></td>
+ <td>
+ Adds comments to the page describing actions by certain filters, and
+ attempts to serve JavaScript injected by PageSpeed in source form
+ rather than compiled and minified.
+ </td>
+ </tr>
+ <tr>
+ <td><code>deterministic_js</code></td>
+ <td>
+ Attempts to provide deterministic JavaScript behavior on each page, for
+ example by replacing the timer and random number generator with
+ functions that return the same sequence of values on every page load.
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="filter-strip-scripts">strip_scripts</a></code></td>
+ <td>
+ Removes all script tags from the document.</td>
+ </tr>
+ </table>
+<p class="note">
+<strong>Note: None of the above filters should be used to serve live traffic.</strong>
+</p>
+
+<h2 id="remote-configuration">Remote Configuration</h2>
+<p class="note"><strong>Note: New feature as of 1.10.33.0</strong></p>
+<p>
+PageSpeed filters and configurations can also be specified by an external
+"Remote Configuration" file. The remote configuration will override
+the main configuration file, override <code>.htaccess</code> configurations, and
+be overridden by any query-level parameters.
+<p>
+To specify the <code>RemoteConfigurationUrl</code>:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRemoteConfigurationUrl https://example.com/remote.conf</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RemoteConfigurationUrl https://example.com/remote.conf;</pre>
+</dl>
+<p>
+The syntax for the remote configuration file is similar to that of the
+<code>.htaccess</code> configurations with a few notable exceptions. Directives
+don't use <code>ModPagespeed</code> as a prefix. Comments are specified by
+<code>#</code> and must be on their own line. Filters and options with
+<code>DirectoryScope</code> or higher may be applied with the remote
+configuration. Any invalid lines in the remote configuration will be skipped, a
+warning will be logged, and the remaining lines will still be parsed. The remote
+configuration terminates with a line beginning with
+<code>EndRemoteConfig</code>, and any lines after this are ignored. If the
+configuration file does not contain a line beginning with
+<code>EndRemoteConfig</code> no configuration will be applied. An example
+configuration for enabling the <code>remove_comments</code> filter is as
+follows.
+<p>
+<pre>
+ # Enable the remove_comments filter.
+ EnableFilter remove_comments
+ EndRemoteConfig
+ # Everything after the previous line will be ignored.
+</pre>
+</p>
+<p>
+The remote configuration file will be fetched on the server's startup,
+and cached for the extent determined by the remote server's
+<code>Cache-Control</code> and <code> Expires</code> headers. For example, if
+the remote configuration hosting server provides the header
+<code>Cache-Control: max-age=3600</code>, the next fetch of the
+remote configuration will happen at the first request after 3600 seconds.
+Failed fetches after successful fetches will continue to serve the stale config.
+The remote configuration should be used in addition to your original
+configuration. The remote configuration is not guaranteed to be fetched and
+applied to every request, so the site should not rely on the remote
+configuration in order to work.
+</p>
+The timeout for the fetching the remote configuration file can also be
+specified. The default timeout is one second. To specify the fetching timeout.
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRemoteConfigurationTimeoutMs 1500</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RemoteConfigurationTimeoutMs 1500;</pre>
+</dl>
+Fetching the remote configuration will block for up to the specified timeout.
+<p class="note"><strong>Note:</strong>
+Remote configurations can not be fetched from the same server that is running
+the instance of pagespeed.
+</p>
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/configuration.html b/doc/configuration.html
new file mode 100644
index 0000000..619f199
--- /dev/null
+++ b/doc/configuration.html
@@ -0,0 +1,638 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Configuration</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed Configuration</h1>
+
+<h2 id="module">Enabling the Module</h2>
+<p>
+PageSpeed contains an "output filter" plus several content handlers.
+<p class="note">
+<strong>Note:</strong>
+The location of the configuration file is dependent both on the Linux
+distribution on which PageSpeed is installed and on whether you're using
+PageSpeed with Apache or Nginx.
+</p>
+
+<p>
+In Apache the configuration file
+is <code>pagespeed.conf</code> and will be in either:
+<pre>
+Debian/Ubuntu: /etc/apache2/mods-available/
+CentOS/Fedora: /etc/httpd/conf.d/
+</pre>
+In Nginx the configuration typically should go in your <code>nginx.conf</code>
+which for source installs defaults to being in:
+<pre>
+/usr/local/nginx/conf/
+</pre>
+</p>
+
+<p>
+In Apache PageSpeed is enabled automatically when you install the module while
+in Nginx you need to add several lines to your <code>nginx.conf</code>. In
+every <code>server</code> block where PageSpeed is enabled add:
+
+<pre>
+pagespeed on;
+
+# Needs to exist and be writable by nginx. Use tmpfs for best performance.
+pagespeed FileCachePath /var/ngx_pagespeed_cache;
+
+# Ensure requests for pagespeed optimized resources go to the pagespeed handler
+# and no extraneous headers get set.
+location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
+ add_header "" "";
+}
+location ~ "^/pagespeed_static/" { }
+location ~ "^/ngx_pagespeed_beacon$" { }
+</pre>
+
+See the <a href="admin#config">Admin Page documentation</a> for
+instructions on how to configure handlers to provide visibility and
+control into PageSpeed's operation.
+
+<h2 id="on_off">Turning the module on and off</h2>
+<!-- keep old anchors so as not to break existing links -->
+<a name="on_off_nginx"></a><a name="nginx_specific"></a>
+
+<h3 id=on>Setting the module on</h3>
+
+<p>
+
+To turn PageSpeed on, just set:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeed on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed on;</pre>
+</dl>
+
+<h3 id=standby>Setting the module to standby</h3>
+
+<p>
+
+PageSpeed has a standby mode where by default it won't make changes to your site
+but it will process two kinds of PageSpeed-specific requests:
+
+<ul>
+ <li><p>Requests with <a href="experiment#PerRequest">PageSpeed query
+ parameters</a>. These allow you to have PageSpeed off in your main
+ configuration, but manually make requests to see how your site would look
+ under various combinations of filters and options.
+ <li><p>Requests for <code>.pagespeed.</code> resources. When PageSpeed is
+ running it creates various kinds of optimized resources, and gives them
+ names containing <code>.pagespeed.</code>. If you turned
+ PageSpeed <a href="#unplugged">fully off</a> then lingering requests to
+ these resorces would fail. In standby mode these requests are still
+ served as if PageSpeed were enabled.
+</ul>
+
+<p>
+
+In versions 1.12 and earlier only mod_pagespeed supported standby mode, via
+the <code>off</code> setting:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeed off</pre>
+</dl>
+
+<p>
+
+In versions 1.13.35.1 and later, both mod_pagespeed and ngx_pagespeed
+support <code>standby</code>:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeed standby</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed standby;</pre>
+</dl>
+
+<h3 id=unplugged>Setting the module fully off</h3>
+
+To turn PageSpeed fully off, set:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeed unplugged</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed unplugged;</pre>
+</dl>
+
+<p class=warning><b>Warning:</b> do not set ngx_pagespeed
+to <code>unplugged</code> in 1.12.34.1 and earlier. That will result in
+crashes. With those versions, use <code>off</code> instead
+of <code>unplugged</code>.
+
+<p>
+
+The <code>on</code>, <code>off</code>, and (in 1.13.35.1 and
+later) <code>standby</code> values can be used in
+<a href="#htaccess"><code>.htaccess</code> files,
+<code><Directory></code></a> scopes, <code>query parameters</code>, and
+<code>headers</code>. The <code>unplugged</code> value can only be used in the
+top-level Apache configuration and in virtual hosts. Note that
+<code>ModPagespeed on</code> in a virtual host can override a top-level
+<code>ModPagespeed unplugged</code> directive.
+</p>
+
+<h2 id="apache_specific">Apache-Specific Configuration</h2>
+
+<h3 id="output_filter">Setting up the Output Filter</h3>
+
+<p>
+The output filter is used to parse, optimize, and re-serialize HTML
+content that is generated elsewhere in the Apache server.
+</p>
+<pre class="prettyprint">
+# Direct Apache to send all HTML output to the mod_pagespeed output handler.
+AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
+</pre>
+<p class="note"><strong>Note:</strong> mod_pagespeed automatically enables
+<code>mod_deflate</code> for compression.
+</p>
+
+<h3 id="apache24">Support for Apache 2.4.x</h3>
+<p>
+<code>mod_pagespeed</code> is compatible with Apache 2.2.x and Apache 2.4.x
+series, versions 2.4.2 and newer. Please note that Apache 2.4.1 has a bug that
+may cause stability problems in combination with <code>mod_pagespeed</code>,
+so use with 2.4.1 is strongly discouraged.
+</p>
+
+<p>
+As Apache 2.4 is not API compatible with 2.2, support for it is provided
+via a separate module binary, <code>mod_pagespeed_ap24.so</code> instead of the
+usual <code>mod_pagespeed.so</code>. The configuration provided in our binary
+packages will normally load the right module version automatically. However,
+if you upgrade the CentOS packages from an earlier version, the needed
+configuration change may not get applied on top of a user-customized
+<code>pagespeed.conf</code>, so you may need to adjust the
+<code>LoadModule</code> line manually.
+</p>
+
+<p>
+Source builds with <code>mod_pagespeed</code>-provided Apache headers will
+build both 2.2.x and 2.4.x binaries as well, and you will need to add a
+<code>LoadModule</code> line matching the server version in use, or use
+a pattern similar to:
+<pre class="prettyprint">
+<IfModule !mod_version.c>
+ LoadModule version_module /usr/lib/apache2/modules/mod_version.so
+</IfModule>
+
+<IfVersion < 2.4>
+ LoadModule pagespeed_module /usr/lib/apache2/modules/mod_pagespeed.so
+</IfVersion>
+<IfVersion >= 2.4.2>
+ LoadModule pagespeed_module /usr/lib/apache2/modules/mod_pagespeed_ap24.so
+</IfVersion>
+</pre>
+to auto-detect. Builds against system Apache headers will only be compatible
+with that version family, and will always produce a single module named
+<code>mod_pagespeed.so</code>.
+</p>
+
+<h2 id="honor-csp">Honoring Content-Security-Policy Headers</h2>
+<p>
+ As of 1.13.35.1 PageSpeed is able to adapt its optimizations according to any
+ Content Security Policies specified in the response headers. In this release
+ you need to opt-in into this feature, future releases may turn it on by
+ default.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeedHonorCsp on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed HonorCsp on;</pre>
+</dl>
+
+<h2 id="respectvary">Respecting Vary Headers</h2>
+<p>
+In order to maximize the number of resources that PageSpeed can rewrite, by
+default the module does not respect <code>Vary: User-Agent</code> and
+other <code>Vary</code> headers on resource files, such as JavaScript and css
+files. By disregarding the <code>Vary</code> headers, PageSpeed is able to keep
+the size of the cache down. PageSpeed will <em>always</em> respect <code>Vary:
+Accept-Encoding</code>, regardless of this setting. PageSpeed will
+also <em>always</em> respect <code>Vary</code> headers on <code>HTML</code>
+files, regardless of this setting.
+</p>
+<p>
+If a site has resources that legitimately vary on <code>User-Agent</code>, or
+on some other attribute, then in order to preserve that behavior, you must
+add</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeedRespectVary on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed RespectVary on;</pre>
+</dl>
+<p>to your configuration file.</p>
+<p>Please note that turning on this option will disable optimization of any
+resources with <code>Vary</code> headers, apart from
+<code>Vary: Accept-Encoding</code>.</p>
+
+<h2 id="notransform">Honoring no-transform Cache-Control Headers</h2>
+<p>
+By default, PageSpeed does not rewrite resources that have
+<code>Cache-Control: no-transform</code> set in the Response Header. This is
+true for all types of resources, such as JavaScript, images, CSS etc. By
+respecting <code>Cache-Control: no-transform</code> headers, PageSpeed cannot
+optimize resources that could otherwise be rewritten.
+</p>
+<p>
+To optimize resources irrespective of <code>Cache-Control: no-transform</code>
+headers, you must add</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">ModPagespeedDisableRewriteOnNoTransform off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">pagespeed DisableRewriteOnNoTransform off;</pre>
+</dl>
+<p>to your configuration file.</p>
+<p>Please note that PageSpeed will always respect
+<code>Cache-Control: no-transform</code> headers on <code>HTML</code> files
+irrespective of the setting. And also, PageSpeed will always retain the
+<code>Cache-Control: no-transform</code> headers on the resource irrespective of
+the setting so that the downstream cache control mechanisms do not get affected.
+</p>
+
+<h2 id="lower_case">Lower-casing HTML element and attribute names</h2>
+<p>
+HTML is
+<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-5353782642-h2">
+ case-insensitive</a>, whereas XML and XHTML are not. Web performance
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload#consistency">Best Practices</a> suggest using lowercase
+keywords, and PageSpeed can safely make that transformation in HTML
+documents.
+</p>
+<p>
+In general, PageSpeed knows whether a document is HTML or not
+via <code>Content-Type</code> tags in HTTP headers, and <code>DOCTYPE</code>.
+However, many web sites have <code>Content-Type: text/html</code> for resources
+that are actually XML documents.
+</p>
+<p>
+If PageSpeed lowercases keywords in XML pages, it can break the consumers of
+such pages, such as Flash. To be conservative and avoid breaking such pages,
+PageSpeed does not lowercase HTML element and attribute names by
+default. However, you can sometimes achieve a modest improvement in the size of
+compressed HTML by enabling this feature with:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedLowercaseHtmlNames on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed LowercaseHtmlNames on;</pre>
+</dl>
+
+<p>
+
+These directives can be used in <a href="#htaccess">location-specific
+configuration sections</a>.
+</p>
+
+<h3>Risks</h3>
+<p>
+This switch is only risky in the presence of XML files that are
+incorrectly served with <code>Content-type: text/html</code>.
+Lower-casing XML element and attribute may affect whatever software is
+reading the XML.
+</p>
+
+<h2 id="ModifyCachingHeaders">Preserving HTML caching headers</h2>
+<p>
+ By default, PageSpeed serves all HTML with
+ <code>Cache-Control: no-cache, max-age=0</code> because the transformations
+ made to the page may not be cacheable for extended periods of time.
+</p>
+<p>
+ If you want to force PageSpeed to leave the original HTML caching headers
+ you can add:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedModifyCachingHeaders off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ModifyCachingHeaders off;</pre>
+</dl>
+<p class="note">
+ <b>Note:</b> We do not suggest you turn this option off. It breaks PageSpeed's
+ caching assumptions and can lead to unoptimized HTML being served from a proxy
+ caches set up in front of the server. If you do turn it off, we suggest that
+ you do not set long caching headers to HTML or users may receive stale or
+ unoptimized content.
+</p>
+
+<h2 id="XHeaderValue">Specifying the value for the PageSpeed header</h2>
+<p>
+ By default, PageSpeed adds an header, <code>X-Mod-Pagespeed</code> in
+ Apache, <code>X-Page-Speed</code> in Nginx, with the version of PageSpeed
+ being used. The format of this header is:
+</p>
+
+<pre>[Major].[Minor].[Branch].[Point]-[Commit]</pre>
+
+<p>
+ For example:
+</p>
+
+<pre>1.9.32.3-4448</pre>
+
+<p>
+ We update these following this schedule:
+</p>
+
+<dl>
+ <dt>Major Version</dt>
+ <dd>Incremented when we make very large changes.</dd>
+
+ <dt>Minor Version</dt>
+ <dd>Incremented for each release since the last major version</dd>
+
+ <dt>Branch Number</dt>
+ <dd>Incremented for every release. Always increasing.</dd>
+
+ <dt>Point Number</dt>
+ <dd>Incremented each time we build a new release candidate or patch release,
+ resets on each minor release.</dd>
+
+ <dt>Commit Number</dt>
+ <dd>Incremented each time we accept a commit to the PSOL trunk. Always
+ increasing.</dd>
+</dl>
+
+<p>
+ All servers running a given release will have the same value for this header
+ by default. If you would like to change the value reported, you can use
+ the <code>XHeaderValue</code> directive to specify what to use instead:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedXHeaderValue "Powered By mod_pagespeed"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed XHeaderValue "Powered By ngx_pagespeed";</pre>
+</dl>
+<p class="note">
+ <b>Note:</b> You cannot suppress the injection of this header. This is because
+ it is used to prevent infinite loops and unnecessary rewrites when PageSpeed
+ fetches resources from an origin that also uses PageSpeed.
+</p>
+
+<h2 id="htaccess">Location-Specific Configuration</h2>
+<p>With an <code>.htaccess</code> file (Apache), <code><Directory></code>
+scope (Apache), or <code>location</code> block (Nginx) you can control most of
+the PageSpeed directives. Note, however, that the
+file-matching is only relevant to the HTML file, and not to any of the resources
+referenced from the HTML file. To restrict resources by directory, you must use
+the PageSpeed <a href="/speed/pagespeed/module/restricting_urls"><code
+>Allow</code> and <code>Disallow</code> directives</a>, using full paths or
+wildcards in those directives.</p>
+
+<p class="warning">
+ <b>Warning:</b> Resources and the HTML files that reference them must have
+ the same options. If they differ you may see poor performance and
+ inconsistent application of options.
+</p>
+
+<p>In Apache, the advantage of <code>.htaccess</code> is that it can be used in
+environments where the site administrator does not have access to the server
+configuration. However, there is a significant per-request overhead from
+processing <code>.htaccess</code> files.
+See <a href="http://httpd.apache.org/docs/2.2/howto/htaccess.html">The Apache
+HTTP Server Documentation</a>:</p>
+
+<p class="note">
+<strong>Note:</strong> You should avoid using <code>.htaccess</code> files
+completely if you have access to the httpd main server config file. Using
+<code>.htaccess</code> files slows down your Apache server. Any directive
+that you can include in a <code>.htaccess</code> file is better set in a
+<a href="http://httpd.apache.org/docs/2.2/mod/core.html#directory"
+ ><code><Directory></code></a> block, as
+it will have the same effect with better performance.
+</p>
+<p>
+<a href="#virtual-hosts">Virtual hosts</a> are generally a better way of
+configuring multiple sites on the same server.
+</p>
+
+<h2 id="virtual-hosts">Using PageSpeed With Virtual Hosts</h2>
+
+<p>By default, PageSpeed enables itself for the entire server, with global
+options propagating to all
+<a href="http://httpd.apache.org/docs/current/vhosts/">VirtualHost</a>s
+(Apache) or <code>server</code> blocks (Nginx). Options can be overridden
+per host, including the ability the limit which hosts PageSpeed runs on.</p>
+
+<p class="note"><strong>Note:</strong>
+When using Apache, it used to be possible to set <code>InheritVHostConfig</code>
+to "off" to stop global configuration from propagating to VHosts. However,
+enabling <code>InheritVHostConfig</code> makes PageSpeed options behave like
+other Apache options and has been the recommended configuration since 2012. The
+option has now been deprecated and will be forced to "on" in the next major
+PageSpeed release.</p>
+
+<dl>
+<dt>Apache:<dd><pre class="prettyprint lang-sh">
+ModPagespeed On
+ModPagespeedInheritVHostConfig on
+ModPagespeedFileCachePath "/var/cache/mod_pagespeed/"
+ModPagespeedEnableFilters combine_css,combine_javascript
+# Direct Apache to send all HTML output to the mod_pagespeed
+# output handler.
+AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
+
+NameVirtualHost *:80
+<VirtualHost *:80>
+ DocumentRoot /www/example1
+ ServerName www.example1.com
+ ModPagespeedMapRewriteDomain cdn.example1.com *example.com
+</VirtualHost>
+
+<VirtualHost *:80>
+ DocumentRoot /www/example2
+ ServerName www.example2.org
+ ModPagespeedMapRewriteDomain cdn.example2.org *example.org
+ # Don't want combine_css here
+ ModPagespeedDisableFilters combine_css
+</VirtualHost>
+
+<VirtualHost *:80>
+ DocumentRoot /www/example3
+ ServerName www.example3.org
+ # mod_pagespeed off for this virtual host
+ ModPagespeed Off
+</VirtualHost>
+</pre>
+<dt>Nginx:<dd><pre class="prettyprint">
+http {
+ pagespeed On;
+ pagespeed FileCachePath "/var/cache/ngx_pagespeed/";
+ pagespeed EnableFilters combine_css,combine_javascript;
+
+ server {
+ listen 80;
+ server_name www.example1.com;
+ root /www/example1;
+ pagespeed MapRewriteDomain cdn.example1.com *example.com;
+ }
+
+ server {
+ listen 80;
+ server_name www.example2.org;
+ root /www/example2;
+ pagespeed MapRewriteDomain cdn.example2.org *example.org;
+ # Don't want combine_css here
+ pagespeed DisableFilters combine_css;
+ }
+
+ server {
+ listen 80;
+ server_name www.example3.org;
+ root /www/example3;
+
+ # mod_pagespeed off for this virtual host
+ pagespeed off;
+ }
+</pre>
+</dl>
+
+<h2 id="preserve-url-relativity">Preserve URL Relativity</h2>
+
+<p>
+ Previous versions of PageSpeed would rewrite relative URLs into absolute URLs.
+ This wastes bytes and can cause problems for sites that sit behind HTTPS
+ terminators.
+</p>
+<p>
+ With <code>PreserveUrlRelativity on</code>, PageSpeed will keep URLs the way
+ they were found. Some examples:
+</p>
+<table>
+ <tr>
+ <th>Original URL</th>
+ <th>Rewritten URL</th>
+ </tr><tr>
+ <td><code>foo/bar.png</code></td>
+ <td><code>foo/bar.png.pagespeed.ic.Hash.png</code></td>
+ </tr><tr>
+ <td><code>/bar.png</code></td>
+ <td><code>/bar.png.pagespeed.ic.Hash.png</code></td>
+ </tr><tr>
+ <td><code>//example.com/bar.png</code></td>
+ <td><code>//example.com/bar.png.pagespeed.ic.Hash.png</code></td>
+ </tr><tr>
+ <td><code>http://example.com/bar.png</code></td>
+ <td><code>http://example.com/bar.png.pagespeed.ic.Hash.png</code></td>
+ </tr>
+</table>
+</ul>
+<p>
+ To enable this option, add:
+</p>
+<dl>
+ <dt>Apache:
+ <dd><pre class="prettyprint">ModPagespeedPreserveUrlRelativity on</pre>
+ <dt>Nginx:
+ <dd><pre class="prettyprint">pagespeed PreserveUrlRelativity on;</pre>
+</dl>
+<p>to your configuration file.</p>
+<p>
+ Note: This option will be enabled by default in future versions of PageSpeed
+ and eventually the option will be removed entirely.
+</p>
+
+<h2 id="pagespeed_static">Configuring the location of static assets</h2>
+
+<p>
+ Several filters, including <a href="filter-js-defer">defer_javascript</a> and
+ <a href="filter-lazyload-images">lazyload_images</a>, require external
+ resources that must be loaded from somewhere. Before 1.8.31.2,
+ mod_pagespeed would load these files from <code>/mod_pagespeed_static</code>
+ while ngx_pagespeed would load them from <code>/ngx_pagespeed_static</code>.
+ In 1.8.31.2 the default was changed to <code>/pagespeed_static</code> for
+ both platforms and a directive was added to make the path configurable:
+</p>
+<dl>
+ <dt>Apache:
+ <dd><pre class="prettyprint"
+ >ModPagespeedStaticAssetPrefix /custom/static/</pre>
+ <dt>Nginx:
+ <dd><pre class="prettyprint"
+ >pagespeed StaticAssetPrefix /custom/static/;</pre>
+</dl>
+
+<h2 id="add-resource-header">Configuring headers for optimized resources</h2>
+<p>
+ When creating optimized <code>.pagespeed.</code> resources, PageSpeed
+ generates headers that are correct for most users. However, some users
+ require additional headers. For instance if you're
+ using <a
+ href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing">CORS</a>
+ and you want to have PageSpeed set <code>Access-Control-Allow-Origin:
+ http://www.example.com</code> headers on the resources it creates, you can
+ set:
+</p>
+<dl>
+ <dt>Apache:
+ <dd><pre class="prettyprint"
+ >ModPagespeedAddResourceHeader "Access-Control-Allow-Origin" "http://www.example.com"</pre>
+ <dt>Nginx:
+ <dd><pre class="prettyprint"
+ >pagespeed AddResourceHeader "Access-Control-Allow-Origin" "http://www.example.com";</pre>
+</dl>
+<p>
+ If you have multiple headers you want inserted you can include
+ an <code>AddResourceHeader</code> directive for each one.
+<p>
+
+<h2 id="ListOutstandingUrlsOnError">List outstanding urls on error</h2>
+<p>
+ When debugging fetching, it can be useful to know how things are failing. If
+ you enable <code>ListOutstandingUrlsOnError</code> then PageSpeed will report
+ a message in the error log at level <code>"error"</code> for every URL fetch
+ in flight when the HTTP stack encounters a system error, e.g. "Connection
+ Refused". To enable this feature, set:
+</p>
+<dl>
+ <dt>Apache:
+ <dd><pre class="prettyprint">ModPagespeedListOutstandingUrlsOnError on</pre>
+ <dt>Nginx:
+ <dd><pre class="prettyprint">pagespeed ListOutstandingUrlsOnError on;</pre>
+</dl>
+
+<h2 id="reverse-proxy">Using PageSpeed as a reverse proxy</h2>
+<p>
+Typically, PageSpeed is used on an Apache or Nginx server that is already
+serving its own content. However, PageSpeed can be used with Nginx or Apache as
+a proxy for another server.
+</p>
+<p>
+With Apache and mod_pagespeed, <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">
+ mod_proxy</a> can be used to configure Apache as a reverse proxy.
+</p>
+<p>
+With Nginx and ngx_pagespeed, <a href="http://nginx.com/resources/admin-guide/reverse-proxy/">
+ proxy_pass</a> can be used to configure Nginx as a reverse proxy.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/console.html b/doc/console.html
new file mode 100644
index 0000000..fb7b95d
--- /dev/null
+++ b/doc/console.html
@@ -0,0 +1,223 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Console</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed Console</h1>
+<h2 id="about">About the Console</h2>
+<p>
+ The PageSpeed Console reports various problems your installation has that can
+ lead to sub-optimal performance. The console graphs metrics for these
+ problems over time so that you can see the result of your changes
+ improving or degrading your performance. You can view it by enabling it and
+ then visiting <code>/pagespeed_admin/console</code> from your server. The
+ console works by saving snapshots of the statistics reported by
+ PageSpeed and then using the Google Chart Tools API to graph those
+ statistics over time.
+<h2 id="configuring">Configuring the Console</h2>
+<p>
+ The PageSpeed Console is configured with several directives in the
+ configuration file. See
+ <a href="install#module">PageSpeed Installation and Configuration</a>
+ for details about this file. Each of these directives is explained here.
+</p>
+<ul>
+ <li>
+ <code><a href="admin#statistics">Statistics</a></code>
+ must be enabled to report statistics.</li>
+ <li>
+ <code>StatisticsLogging</code> must be enabled so that graphs of
+ statistics over time can be drawn in the console.</li>
+ <li>
+ <code>LogDir</code> must be set so that we have a directory to store
+ statistic logs.</li>
+ <li>
+ In order to access the console, you must set a handler appropriately.
+ For example, to make the console only accessible from localhost:
+ <dl>
+ <dt>Apache:<dd><pre>
+ModPagespeedStatistics on
+ModPagespeedStatisticsLogging on
+ModPagespeedLogDir /var/log/pagespeed
+<Location /pagespeed_admin>
+ Order allow,deny
+ Allow from localhost
+ Allow from 127.0.0.1
+ SetHandler pagespeed_admin
+</Location></pre>
+ <dt>Nginx:<dd><pre>
+pagespeed Statistics on;
+pagespeed StatisticsLogging on;
+pagespeed LogDir /var/log/pagespeed;
+pagespeed AdminPath /pagespeed_admin;
+
+location ~ ^/pagespeed_admin {
+ allow 127.0.0.1;
+ deny all;
+}</pre>
+ </dl>
+ </li>
+</ul>
+<p>
+ Additionally these optional parameters may be configured:
+</p>
+<ul>
+ <li>
+ <code>StatisticsLoggingIntervalMs</code> may be set to indicate how often
+ to log statistics snapshots (in milliseconds).</li>
+ <li>
+ <code>StatisticsLoggingMaxFileSizeKb</code> may be set to indicate the
+ maximum size for the logfile (in kilobytes).</li>
+</ul>
+<p>
+ For example, to log once a minute with a maximum log size of 1 MB:
+</p>
+<dl>
+ <dt>Apache:<dd><pre>
+ModPagespeedStatisticsLoggingIntervalMs 60000
+ModPagespeedStatisticsLoggingMaxFileSizeKb 1024</pre>
+ <dt>Nginx:<dd><pre>
+pagespeed StatisticsLoggingIntervalMs 60000;
+pagespeed StatisticsLoggingMaxFileSizeKb 1024;</pre>
+</dl>
+
+<h2 id="access">Accessing the Console</h2>
+<p>
+ The console can be accessed by browsing to
+ <code>http://your.example.com/pagespeed_admin/console</code>. Access to
+ this page can be controlled using standard access directives.
+</p>
+<p>
+ Note that if you would like to access the console from machines other
+ than your server, you will need to allow access to
+ <code>/pagespeed_admin</code>.
+</p>
+
+<!-- TODO(sligocki): Add section for features, like zooming in, etc. once we
+ add them. -->
+
+<h2 id="graphs">Graphed metrics</h2>
+The PageSpeed console displays graphs for these metrics:
+<ul>
+ <li id="fetch-failure">
+ <b>Resources not loaded because of fetch failures</b>:
+ Images, CSS or JavaScript could not be loaded because backend HTTP fetch
+ failed. <b>Remedy</b>: You may have to reconfigure your server to allow
+ outgoing connections or to have access to DNS.</li>
+
+ <li id="not-authorized">
+ <b>Resources not rewritten because domain wasn't authorized</b>:
+ Resources could not be rewritten because they were on a different domain
+ than the HTML and that domain was not explicitly authorized.
+ <b>Remedy</b>: Add <a href="domains#auth_domains">Domain</a>
+ authorizations for all domains you control.</li>
+
+ <li id="cache-control">
+ <b>Resources not rewritten because of restrictive Cache-Control headers</b>:
+ Resources could not be rewritten because they had restrictive Cache-Control
+ headers explicitly set (for example: <code>Cache-Control: private</code>,
+ <code>Cache-Control: max-age=0</code> or
+ <code>Cache-Control: no-transform</code>).
+ <b>Remedy</b>: Reconfigure your server to serve these resources with
+ public caching headers (or no Cache-Control headers at all). For example,
+ <code>Header set Cache-Control "max-age=600"</code> in Apache config.</li>
+
+ <li id="cache-miss">
+ <b>Cache misses</b>:
+ Resources were not rewritten because they were not found in cache.
+ This is expected while your cache warms up, soon after you install, however
+ if it continues to be high, your cache is probably too small.
+ <b>Remedy</b>: Increase the
+ <a href="system#file_cache">FileCacheSizeKb</a> to be about 5 times
+ as large as your website content (to store all of the original
+ resources and various versions of rewritten resources).</li>
+
+ <li id="cache-expired">
+ <b>Cache lookups that were expired</b>:
+ Although these resources were found in cache, they were not rewritten
+ because they were older than their max-age.
+ <b>Remedy</b>: (A) Enable
+ <a href="domains#ModPagespeedLoadFromFile">LoadFromFile</a> to tell
+ the server to load the files straight from disk rather than through
+ HTTP. (B) Reconfigure your server to serve resources with longer TTL.
+ For example, <code>Header set Cache-Control "max-age=3600"</code> to set
+ one hour TTL in Apache config.</li>
+
+ <li id="css-error">
+ <b>CSS files not rewritten because of parse errors</b>:
+ CSS files could not be rewritten because our parser found syntax errors
+ that it could not recover from. <b>Remedy</b>: Fix CSS files to use
+ proper syntax. You can use the stand-alone
+ <a href="build_mod_pagespeed_from_source#debug-css">css_minify_main</a>
+ to find what part of the CSS file has parse errors. We have had some
+ problems in the past with valid CSS3 or proprietary CSS extensions
+ causing CSS parsing errors. If you find that your valid CSS is failing to
+ parse, let us know on our <a href="mailing-lists#discussion">discussion
+ group</a> so we can fix the parser.</li>
+
+ <li id="js-error">
+ <b>JavaScript minification failures</b>:
+ JavaScript files could not be minified because our parser found some
+ syntax problem that it could not recover from. This is very uncommon.
+ <b>Remedy</b>: As with CSS, fix the JavaScript files that had problems.</li>
+
+ <li id="image-error">
+ <b>Image rewrite failures</b>:
+ Image files were not rewritten for various reasons:<ul>
+ <li><code>image_norewrites_high_resolution</code>: Image was too large.
+ Currently we only rewrite images below 8 Megapixels.
+ <b>Remedy</b>: Resize original images to a reasonable size.</li>
+ <li><code>image_rewrites_dropped_decode_failure</code>: Image could not
+ be parsed by our code. <b>Remedy</b>: Fix malformed images.</li>
+ <li><code>image_rewrites_dropped_due_to_load</code>: Image was not
+ rewritten because your system was already busy rewriting other images.
+ This generally can happen when you first install PageSpeed
+ while the cache warms up. <b>Remedy</b>: If image rewrites continue
+ to be dropped after a day or so, you may need to
+ <a href="#cache-miss">increase your cache size</a> or increase the
+ <a href="reference-image-optimize#ImageMaxRewritesAtOnce">
+ ImageMaxRewritesAtOnce</a>.</li>
+ <li><code>image_rewrites_dropped_mime_type_unknown</code>: Image could
+ not be rewritten because we do not recognize its MIME-type. For
+ example, we do not parse <code>image/x-icon</code> or
+ <code>image/svg+xml</code>. <b>Remedy</b>: Convert your images to a
+ type that we understand (gif, png, jpg, webp) or perhaps just fix
+ a broken server config that is serving images with a bogus
+ <code>Content-Type</code> header.</li>
+ <li><code>image_rewrites_dropped_server_write_fail</code>: Unexpected
+ server error while rewriting images. If you get a significant number
+ of these write to our <a href="mailing-lists#discussion">discussion
+ group</a> so we can investigate.</li>
+ </ul>
+ </li>
+</ul>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/doc.css b/doc/doc.css
new file mode 100644
index 0000000..e5352cb
--- /dev/null
+++ b/doc/doc.css
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+body {
+ font-family: sans-serif;
+ margin: 0;
+ padding: 0;
+ line-height: 1.5;
+ word-wrap: break-word;
+}
+
+a {
+ color: #0288d1;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+#header, #navline {
+ color: white;
+}
+
+#header a, #navline a {
+ color: white;
+}
+
+#logoline {
+ background-color: #0061ff;
+ padding: 1em;
+}
+
+#logo {
+ display: inline-block;
+ position: relative;
+ top: 4px;
+}
+
+#logotext {
+ font-size: 32px;
+ display: inline-block;
+}
+
+#navline a{
+ background-color: #3d87ff;
+ display: block;
+ padding: 0.5em 1em 0.5em 1em;
+}
+
+#content {
+ margin: 0.5em;
+ max-width: 50em;
+}
+
+code, pre {
+ background: #f7f7f7;
+ color: #37474f;
+}
+
+.note, .note code {
+ background: #e1f5fe;
+ color: #0288d1;
+}
+
+.note a {
+ color: #0288d1;
+ text-decoration: underline;
+}
+
+.caution, .caution code {
+ background: #fff3e0;
+ color: #dd2c00;
+}
+
+.caution a {
+ color: #dd2c00;
+ text-decoration: underline;
+}
+
+.warning, .warning code {
+ background: #fbe9e7;
+ color: #d50000;
+}
+
+.warning a {
+ color: #d50000;
+ text-decoration: underline;
+}
+
+.note, .caution, .warning {
+ padding: 1em;
+}
+
+pre {
+ padding: 1em;
+ overflow: auto;
+ line-height: 1.1;
+}
+
+table {
+ margin-top: 1em;
+ margin-bottom: 1em;
+ border-collapse: collapse;
+}
+
+th {
+ color: #fff;
+ vertical-align: middle;
+ background-color: #555;
+}
+
+td {
+ border-top: 1px solid #e0e0e0;
+ background-color: #f7f7f7;
+}
+
+th, td {
+ padding: 1em;
+}
+
+li {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+img {
+ max-width: 100%;
+}
+
+.table-wrapper {
+ max-width: 100%;
+ overflow: auto;
+}
+
+#downloads .download {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+#toc {
+ border-left: 4px solid #0061ff;
+ font-size: 0.9em;
+ max-width: 25em;
+ margin-top: 1em;
+ margin-left: 1em;
+}
+
+#toc-contents {
+ color: #757575;
+ font-weight: bold;
+ padding-left: 1em;
+}
+
+#toc ul {
+ list-style: none;
+ list-style-position: inside;
+ padding-left: 1em;
+}
+
+@media screen and (min-width: 55em) {
+ #toc {
+ float: right;
+ max-width: 18em;
+ padding-right: 1em;
+ }
+}
+
+.header-link {
+ visibility: hidden;
+ font-size: 80%;
+}
+
+h2:hover .header-link,
+h3:hover .header-link,
+h4:hover .header-link,
+h5:hover .header-link,
+h6:hover .header-link {
+ visibility: initial;
+ text-decoration: none;
+}
+
+.column {
+ margin: 0.5em;
+}
+
+.columns {
+ max-width: 75em;
+}
+
+@media screen and (min-width: 50em) {
+ .column {
+ display: inline-block;
+ vertical-align: top;
+ }
+}
diff --git a/doc/domains.html b/doc/domains.html
new file mode 100644
index 0000000..eef8c60
--- /dev/null
+++ b/doc/domains.html
@@ -0,0 +1,1025 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Authorizing and Mapping Domains</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed Authorizing and Mapping Domains</h1>
+<h2 id="auth_domains">Authorizing domains</h2>
+<p>
+In addition to optimizing HTML resources, PageSpeed restricts itself to
+optimizing resources (JavaScript, CSS, images) that are served from domains,
+with optional paths, that must be explicitly listed in the configuration file.
+For example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDomain http://example.com
+ModPagespeedDomain cdn.example.com
+ModPagespeedDomain http://styles.example.com/css
+ModPagespeedDomain *.example.org</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed Domain http://example.com;
+pagespeed Domain cdn.example.com;
+pagespeed Domain http://styles.example.com/css;
+pagespeed Domain *.example.org;</pre>
+</dl>
+
+<p>
+PageSpeed will rewrite resources found from these explicitly
+listed domains, although in the case of <code>styles.example.com</code>
+only resources under the <code>css</code> directory will be rewritten.
+Additionally, it will rewrite resources that are
+served from the same domain as the HTML file, or are specified as
+a path relative to the HTML. When resources are rewritten, their
+domain and path are not changed. However, the leaf name is changed to
+encode rewriting information that can be used to identify and serve
+the optimized resource.
+</p>
+
+<p>The leading "http://" is optional; bare hostnames will be interpreted
+as referring to HTTP. Wildcards can be used in the domain.</p>
+
+<p>
+These directives can be used
+in <a href="configuration#htaccess">location-specific configuration
+sections</a>.
+</p>
+
+
+<h2 id="mapping_origin">Mapping origin domains</h2>
+
+<p>In order to improve the performance of web pages, PageSpeed
+must examine and modify the content of resources referenced on those
+pages. To do that, it must fetch those resources using HTTP, using
+the URL reference specified on the HTML page.</p>
+
+<p>In some cases, the URL specified in the HTML file is not the best URL to use
+to fetch the resource. Scenarios where this is a concern include:</p>
+<ol>
+ <li>If the server is behind a load balancer, and it's more efficient to
+ reference the server directly by its IP address, or as 'localhost'.</li>
+ <li>The server has a special DNS configuration</li>
+ <li>The server is behind a firewall preventing outbound connections</li>
+ <li>The server is running in a CDN or proxy, and must go back to the
+ origin server for the resources</li>
+ <li>The server needs to service https requests</li>
+</ol>
+
+<p>In these situations the remedy is to map the origin domain:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedMapOriginDomain origin_to_fetch_from origin_specified_in_html [host_header]</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed MapOriginDomain origin_to_fetch_from origin_specified_in_html [host_header];</pre>
+</dl>
+
+<p>Wildcards can also be used in the <code>origin_specified_in_html</code>, e.g.
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMapOriginDomain localhost *.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MapOriginDomain localhost *.example.com;</pre>
+</dl>
+
+<p>The <code>origin_to_fetch_from</code> can include a path after the domain
+name, e.g.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMapOriginDomain localhost/example *.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MapOriginDomain localhost/example *.example.com;</pre>
+</dl>
+
+<p>When a path is specified, the source domain is mapped to the destination
+domain and the source path is mapped to the concatenation of the path from
+<code>origin_to_fetch_from</code> and the source path. For example, given the
+above mapping, <code>http://www.example.com/index.html</code> will be mapped
+to <code>http://localhost/example/index.html</code>.</p>
+
+<p>The origin_specified_in_html can specify https but the origin_to_fetch_from
+can only specify http, e.g.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMapOriginDomain http://localhost https://www.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MapOriginDomain http://localhost https://www.example.com;</pre>
+</dl>
+
+<p>This directive lets the server accept https requests for
+<code>www.example.com</code> without requiring a SSL certificate to fetch
+resources. For example, given the above mapping, and assuming the server is
+configured for https support, PageSpeed will fetch and optimize resources
+accessed using
+<code>https://www.example.com</code>, fetching the resources from
+<code>http://localhost</code>, which can be the same server process or a
+different server process.
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedMapOriginDomain http://localhost https://www.example.com
+ModPagespeedShardDomain https://www.example.com \
+ https://example1.cdn.com,https://example2.cdn.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed MapOriginDomain http://localhost https://www.example.com;
+pagespeed ShardDomain https://www.example.com
+ https://example1.cdn.com,https://example2.cdn.com;</pre>
+</dl>
+
+<p>In this example the https origin domain is mapped to <code>localhost</code>
+<em>and</em> <a href="domains#shard">sharding</a> is used to parallelize
+downloads across hostnames. Note that the shards also specify https.</p>
+
+<p>By specifying a source domain in this directive, you are authorizing
+PageSpeed to rewrite resources found in that domain. For example, in the
+above directives, '*.example.com' gets authorized for rewrites from HTML files,
+but 'localhost' does not. See <a href="#auth_domains"><code
+>Domain</code></a>.</p>
+
+<p>When PageSpeed fetches resources from a mapped origin domain, it
+specifies the source domain in the <code>Host:</code> header in the
+request. You can override the <code>Host:</code> header value with the
+optional third parameter <code>host_header</code>. See
+<a href="#shared_cdn">Mapping Origins with a Shared Domain</a> for
+an example.</p>
+
+<p>
+ See also
+ <a href="#ModPagespeedLoadFromFile"><code>LoadFromFile</code></a>
+ to load origin resource directly from the filesystem and avoid an HTTP
+ connection altogether.
+</p>
+
+<p>
+These directives can be used
+in <a href="configuration#htaccess">location-specific configuration
+sections</a>.
+</p>
+
+
+<h2 id="mapping_rewrite">Mapping rewrite domains</h2>
+
+<p>When PageSpeed rewrites a resource, it updates the HTML to
+refer to the resource by its new name. Generally PageSpeed leaves
+the resource at the same origin and path that was originally found in
+the HTML. However, it is possible to map the domain of rewritten
+resources. Examples of why this might be desirable include:</p>
+
+<ol>
+ <li>Serving static content from cookieless domains, to reduce the size of
+ HTTP requests from the browser. See
+ <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload">Minimizing Payload</a>
+ <li>To move content to a Content Delivery Network (CDN)</li>
+</ol>
+
+<p>This is done using the configuration file directive:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedMapRewriteDomain domain_to_write_into_html \
+ domain_specified_in_html</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed MapRewriteDomain domain_to_write_into_html
+ domain_specified_in_html;</pre>
+</dl>
+
+<p>Wildcards can also be used in the <code>domain_specified_in_html</code>, e.g.
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMapRewriteDomain cdn.example.com *example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MapRewriteDomain cdn.example.com *example.com;</pre>
+</dl>
+
+<p>The <code>domain_to_write_into_html</code> can include a path after the
+domain name, e.g.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMapRewriteDomain cdn.com/example *.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MapRewriteDomain cdn.com/example *.example.com;</pre>
+</dl>
+
+<p>When a path is specified, the source domain is rewritten to the destination
+domain and the source path is rewritten to the concatenation of the path from
+<code>domain_to_write_into_html</code> and the source path. For example, given
+the above mapping, <code>http://www.example.com/index.html</code> will be
+rewritten to <code>http://cdn.com/example/index.html</code>.</p>
+
+<p class="note" id="equiv_servers">
+<strong>Note:</strong> It is the responsibility of the site administrator to
+ensure that PageSpeed is installed on
+the <code>domain_to_write_into_html</code>. This might be a separate server, or
+there may be a single server with multiple domains mapped into it. The files
+must be accessible via the same path on the destination server as was specified
+in the HTML file. No other files should be stored on the
+<code>domain_to_write_into_html</code> -- it should be functionally equivalent
+to <code>domain_specified_in_html</code>. See
+also <a href="#MapProxyDomain">MapProxyDomain</a> which enables proxying content
+from a different server.</p>
+
+<p>For example, if PageSpeed
+cache_extends <code>http://www.example.com/styles/style.css</code> to
+<code>http://cdn.example.com/styles/style.css.pagespeed.ce.HASH.css</code>,
+then <code>cdn.example.com</code> will have to have a mechanism in place to
+either rewrite that file in place, or refer back to the origin server to
+pull the rewritten content.
+</p>
+
+<p class="note">
+<strong>Note:</strong> It is the responsibility of the site
+administrator to ensure that moving resources onto domains does not
+create a security vulnerability. In particular, if the target domain
+has cookies, then any JavaScript loaded from a resource moved to a
+domain with cookies will gain access to those cookies. In general,
+moving resources to a cookieless domain is a great way to improve
+security. Be aware that CSS can load JavaScript in certain environments.
+</p>
+
+<p>By specifying a domain in this directive, either as source or destination,
+you are authorizing PageSpeed to rewrite resources found in this
+domain. See <a href="#auth_domains"><code>Domain</code></a>.</p>
+
+<p>These directives can be used
+in <a href="configuration#htaccess">location-specific configuration
+sections</a>.</p>
+
+<h3 id="shared_cdn">Mapping Origins with a Shared CDN</h3>
+
+<p>Consider a scenario where an installation serving multiple domains
+uses a single CDN for caching and delivery of all content. The origin
+fetches need to be routed to the correct VirtualHost on the server.
+This can be achieved by using a subdirectory per domain in the
+CDN, and then using that subdirectory to map to the correct
+VirtualHost at origin. The host-header control offered by the third
+argument to <a href="#mapping_origin">MapOriginDomain</a> makes this
+feasible.</p>
+
+<p>In the example below, resources with a domain of
+sharedcdn.example.com and path starting with /vhost1 will be fetched
+from localhost but with a <code>Host:</code> header value of
+vhost1.example.com. Without the third argument to MapOriginDomain,
+the <code>Host:</code> header would be sharedcdn.example.com.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedMapOriginDomain localhost sharedcdn.example.com/vhost1 vhost1.example.com
+ModPagespeedMapRewriteDomain sharedcdn.example.com/vhost1 vhost1.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed MapOriginDomain localhost sharedcdn.example.com/vhost1 vhost1.example.com;
+pagespeed MapRewriteDomain sharedcdn.example.com/vhost1 vhost1.example.com;</pre>
+</dl>
+
+<p>This would be used in conjunction with a VirtualHost setup for
+vhost1.example.com, and a single CDN setup for multple hosts segregated by
+subdirectory.</p>
+
+<h2 id="shard">Sharding domains</h2>
+
+<p>Best practices suggest <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt"
+>minimizing round-trip times</a> by <a
+ target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt#ParallelizeDownloads"
+>parallelizing downloads across hostnames</a>. PageSpeed can partially
+automate this for resources that it rewrites, using the directive:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedShardDomain domain_to_shard shard1,shard2,shard3...</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ShardDomain domain_to_shard shard1,shard2,shard3...;</pre>
+</dl>
+
+<p>Wildcards cannot be used in this directive.</p>
+
+<p>This will distribute the domains for rewritten URLs among the
+specified shards. The shard selected for a particular URL is computed
+from the original URL.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedShardDomain example.com \
+ static1.example.com,static2.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed ShardDomain example.com static1.example.com,static2.example.com;</pre>
+</dl>
+
+
+<p>
+Using this directive, PageSpeed will distribute roughly half the
+resources rewritten from example.com
+into <code>static1.example.com</code>, and the rest to
+<code>static2.example.com</code>. You can specify as many shards as
+you like. The optimum number of shards is a topic of active
+research, and is browser-dependent. Configuring between 2 and 4
+shards should yield good results. Changing the number of shards
+will cause PageSpeed to choose different names for resources,
+resulting in a partial cache flush.</p>
+
+<p>When used in combination with <code>RewriteDomain</code>, the Rewrite
+mappings will be done first. Then the shard selection occurs. Origin domains
+are always tracked so that when a browser sends a sharded URL back to the
+server, PageSpeed can find it.
+</p>
+<p>Let's look at an example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedShardDomain example.com static1.example.com,static2.example.com
+ModPagespeedMapRewriteDomain example.com www.example.com
+ModPagespeedMapOriginDomain localhost example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed ShardDomain example.com static1.example.com,static2.example.com;
+pagespeed MapRewriteDomain example.com www.example.com;
+pagespeed MapOriginDomain localhost example.com;</pre>
+</dl>
+
+<p>In this example, <code>example.com</code>
+and <code>www.example.com</code> are "tied" together via
+<code>MapRewriteDomain</code>. The origin-mapping
+to <code>localhost</code> propagates automatically
+to <code>www.example.com</code>, <code>static1.example.com</code>, and
+<code>static2.example.com</code>. So when PageSpeed cache-extends an HTML
+stylesheet reference <code>http://www.example.com/styles.css</code>, it will be:
+</p>
+<ol>
+ <li>Fetched by the server rewriting the HTML
+ from <code>localhost</code></li>
+ <li>Rewritten to
+ <code>http://example.com/styles.css.pagespeed.ce.HASH.css</code></li>
+ <li>Sharded to
+ <code>http://static1.example.com/styles.css.pagespeed.ce.HASH.css</code>
+ </li>
+</ol>
+
+<h2 id="MapProxyDomain">Proxying and optimizing resources from
+ trusted domains</h2>
+
+<p>
+ Proxying resources is desirable under several scenarios:
+</p>
+<ul>
+ <li>The resources on the origin domain may benefit from optimizations
+ done by PageSpeed.</li>
+ <li>SPDY may work better if there are fewer domains on a page.</li>
+ <li>The target domain running PageSpeed may have better serving
+ infrastructure than the origin.</li>
+</ul>
+<p>
+ It is possible to proxy and optimize resources whose origin is a trusted
+ domain that may not be running PageSpeed. This cannot be directly achieved
+ with MapRewriteDomain because that is a declaration that the domains listed
+ are functionally equivalent to one another, either because they are backed by
+ the same storage, or because the target is acting as a proxy (e.g. a
+ CDN). <code>MapProxyDomain</code> makes it technically possible to proxy and
+ optimize resources from any domain <b>that you trust</b>.
+
+<p class="warning">
+ You must only proxy resources that are controlled by an organization
+ you <b>trust</b> because it is possible for malicious content (e.g.
+ <a href="http://hackaday.com/2008/08/04/the-gifar-image-vulnerability/"
+ >GIFAR</a>)
+ proxied from an untrustworthy domain to gain access to private
+ content on your domain, compromising your site or its viewers. You
+ must never map directories that may contain files that may be
+ controlled by a third party.
+</p>
+<p class="warning">
+ There may be legal issues restricting the optimization of resources
+ you don't own. If in doubt consult a lawyer.
+ {# TODO(jmarantz): it should be possible to use this directive in #}
+ {# combination with Disallow & rewrite_domains to proxy without #}
+ {# optimizing. A demo/test of that will be left for a follow-up. #}
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedMapProxyDomain target_domain/subdir \
+ origin_domain/subdir [rewrite_domain/subdir]
+</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed MapProxyDomain target_domain/subdir
+ origin_domain/subdir [rewrite_domain/subdir];</pre>
+</dl>
+
+<p>
+If the optional rewrite_domain/subdir argument is supplied then optimized
+resources will be rewritten to that location. This is useful for rewriting
+optimized resources proxied from an external origin to a CDN.
+</p>
+<p>
+ It is important to specify a subdirectory in the target domain, because
+ PageSpeed will need to be able to unambiguously identify the
+ origin domain given the target when fetching content. Thus each
+ MapProxyDomain command should be given a distinct subdirectory
+ of the target domain.
+</p>
+<p>
+ It is important to specify a subdirectory in the origin domain to
+ limit the scope of the proxying. For example,
+ in <a href="https://picasaweb.google.com">picasaweb</a>, all of a user's
+ photos are underneath a single subdirectory; it is critical not to enable
+ proxying for the entire site.
+</p>
+<h3>Example</h3>
+<p>
+You can see proxy-mapping in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/proxy_external_resource.html">example</a>.
+</p>
+
+<h2 id="fetch_servers">Fetch server restrictions</h2>
+ <p> PageSpeed will only fetch resources from <code>localhost</code> and
+ domains explicitly mentioned in domain configuration directives such
+ as <code>Domain</code>, <code>MapRewriteDomain</code>
+ and <code>MapOriginDomain</code>. As this security restriction is not
+ desirable for some large deployments, in Apache it is possible to disable it
+ starting from 0.10.22.7, via the following configuration directive (which has
+ a global effect): <pre class="prettyprint"
+ >ModPagespeedDangerPermitFetchFromUnknownHosts on</pre>
+
+ <p class="warning"><strong>Warning: </strong>Enabling
+ <code>DangerPermitFetchFromUnknownHosts</code> could permit
+ hostile third parties to access any machine and port that the server running
+ mod_pagespeed has access to, including potentially those behind firewalls.
+ </p>
+ Before doing this, however, it must be ensured that at least one of these
+ things is true:
+ <ol>
+ <li>The server running mod_pagespeed has no more access to machines or
+ ports than anyone on the Internet, and that machines it can access will
+ not treat its traffic specially (mod_pagespeed 0.10.22.6 and newer will
+ make sure its own traffic to <code>localhost</code> does not appear to be
+ local, but that does not work across machines)</li>
+ <li>Every virtual host in Apache running mod_pagespeed (and, if applicable,
+ the global configuration) has an accurate explicit <code>ServerName</code>,
+ and sets the options <code>UseCanonicalName</code> and
+ <code>UseCanonicalPhysicalPort</code> to <code>On</code>.
+ <li>A proxy running in front of the mod_pagespeed server fully verifies that
+ the URLs and <code>Host:</code> headers that reach it refer only to machines
+ the mod_pagespeed server is expected to contact.
+ </ol>
+ If possible, you are strongly encouraged to use
+ <code>MapOriginDomain</code> in preference to this switch.
+</p>
+
+<h2 id="url-valued-attributes">Specifying additional URL-valued attributes</h2>
+
+<p>
+ All PageSpeed filters that process URLs need to know which attributes of
+ which elements to consider. By default they consider those in the HTML4 and
+ HTML5 specifications and a few common extensions:
+</p>
+<pre class="prettyprint">
+ <a href=...>
+ <area href=...>
+ <audio src=...>
+ <blockquote cite=...>
+ <body background=...>
+ <button formaction=...>
+ <command icon=...>
+ <del cite=...>
+ <embed src=...>
+ <form action=...>
+ <frame src=...>
+ <html manifest=...>
+ <iframe src=...>
+ <img src=...>
+ <input type="image" src=...>
+ <ins cite=...>
+ <link href=...>
+ <q cite=...>
+ <script src=...>
+ <source src=...>
+ <td background=...>
+ <th background=...>
+ <table background=...>
+ <tbody background=...>
+ <tfoot background=...>
+ <thead background=...>
+ <track src=...>
+ <video src=...>
+</pre>
+<p>
+ If your site uses a non-standard attribute for URLs, PageSpeed won't
+ know to rewrite them or the resources they reference. To identify them to
+ PageSpeed, use the <code>UrlValuedAttribute</code> directive.
+ For example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedUrlValuedAttribute span src hyperlink
+ModPagespeedUrlValuedAttribute div background image</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed UrlValuedAttribute span src hyperlink;
+pagespeed UrlValuedAttribute div background image;</pre>
+</dl>
+
+<p>
+ These would identify <code><span src=...></code> and <code><div
+ background=...></code> as containing URLs. Further,
+ the <code>background</code> attribute of <code>div</code> elements would be
+ treated as referring to an image and would be treated just like an image
+ resource referenced with <code><img src=...></code>. The general form
+ is:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedUrlValuedAttribute ELEMENT ATTRIBUTE CATEGORY</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed UrlValuedAttribute ELEMENT ATTRIBUTE CATEGORY;</pre>
+</dl>
+
+<p>
+ All fields are case-insensitive.
+ <span id="categories">Valid categories are:</span>
+ <ul>
+ <li><code>script</code></li>
+ <li><code>image</code></li>
+ <li><code>stylesheet</code> (As of 1.12.34.1)</li>
+ <li><code>otherResource</code>
+ <ul><li>Any other URL that will be automatically loaded by the
+ browser along with the main page. For example,
+ the <code>manifest</code> attribute of the <code>html</code>
+ element or the <code>src</code> attribute of
+ an <code>iframe</code> element.</li></ul>
+ </li>
+ <li><code>hyperlink</code>
+ <ul><li>A link to another page or resource that a browser wouldn't
+ normally load in connection to this page (like
+ the <code>href</code> attribute of an <code>a</code> element).
+ These URLs will still be rewritten
+ by <code>MapRewriteDomain</code> and similar directives, but they
+ will not be sharded and PageSpeed will not load the URL and
+ rewrite the resource.</li></ul>
+ </li>
+ </ul>
+ When in doubt, <code>hyperlink</code> is the safest choice.
+
+<p class="note">
+ <b>Note:</b> Until 1.12.34.1, <code>stylesheet</code> was accepted by the
+ configuration parser, but was non-functional.
+</p>
+
+</p>
+
+<h2 id="ModPagespeedLoadFromFile">Loading static files from disk</h2>
+<p>
+ By default PageSpeed loads sub-resources via an HTTP fetch. It would be
+ faster to load sub-resources directly from the filesystem, however this may
+ not be safe to do because the sub-resources may be dynamically generated or
+ the sub-resources may not be stored on the same server.
+</p>
+<p>
+ However, you can explicitly tell PageSpeed to load static sub-resources from
+ disk by using the <code>LoadFromFile</code> directive. For example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLoadFromFile "http://www.example.com/static/" \
+ "/var/www/static/"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LoadFromFile "http://www.example.com/static/"
+ "/var/www/static/";</pre>
+</dl>
+
+<p>
+ tells PageSpeed to load all resources whose URLs start
+ with <code>http://www.example.com/static/</code> from the filesystem
+ under <code>/var/www/static/</code>. For
+ example, <code>http://www.example.com/static/images/foo.png</code> will be
+ loaded from the file <code>/var/www/static/images/foo.png</code>.
+ However, <code>http://www.example.com/bar.jpg</code> will still be fetched
+ using HTTP.
+</p>
+<p>
+ If you need more sophisticated prefix-matching behavior, you can use
+ the <code>LoadFromFileMatch</code> directive, which
+ supports <a href="https://github.com/google/re2/wiki/Syntax">RE2-format</a>
+ regular expressions. (Note that this is not the same format as the wildcards
+ used above and elsewhere in PageSpeed.) For example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLoadFromFileMatch "^https?://example.com/~([^/]*)/static/" \
+ "/var/www/static/\\1"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LoadFromFileMatch "^https?://example.com/~([^/]*)/static/"
+ "/var/www/static/\\1";</pre>
+</dl>
+
+<p>
+ Will load <code>http://example.com/~pat/static/cat.jpg</code> from
+ <code>/var/www/static/pat/cat.jpg</code>,
+ <code>http://example.com/~sam/static/images/dog.jpg</code> from
+ <code>/var/www/static/sam/images/dog.jpg</code>, and
+ <code>https://example.com/~al/static/css/ie</code> from
+ <code>/var/www/static/al/css/ie</code>. The resource
+ <code>http://example.com/~pat/images/static/puppy.gif</code>, however,
+ would not be matched by this directive and would be fetched using HTTP.
+</p>
+<p>
+ Because PageSpeed is loading the files directly from the filesystem, no custom
+ headers will be set. For example, no headers set with the <code>Header
+ set</code> (Apache) or <code>add_header</code> (Nginx) directives will be
+ applied to these resources. If you have resources that need to be served with
+ custom headers, such as <code>Cache-Control: private</code>, you need to
+ exclude them from <code>LoadFromFile</code>. For resources PageSpeed
+ rewrites <a href="system#ipro">in-place</a> it will set a 5-minute cache
+ lifetime by default, which you can adjust by
+ changing <a href="system#load_from_file_cache_ttl"><code
+ >LoadFromFileCacheTtlMs</code></a>.
+</p>
+<p>
+ Furthermore, the content type will be set based
+ upon only the filename extension and only for common filename extensions we
+ recognize (<code>.html</code>, <code>.css</code>, <code>.js</code>,
+ <code>.jpg</code>, <code>.jpeg</code>, ... see full
+ list: <a href="https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/kernel/http/content_type.cc">content_type.cc</a>).
+ Before 1.9.32.1, filenames with unrecognized extensions were served with no
+ <code>Content-Type</code> header; in 1.9.32.1 and later such filenames will
+ not be loaded from file and instead will fall back to ordinary fetching.
+</p>
+<p>
+ You can also use the <code>LoadFromFile</code> directive to
+ load HTTPS resources which would not be otherwise fetchable directly.
+ For example:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLoadFromFile "https://www.example.com/static/" \
+ "/var/www/static/"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LoadFromFile "https://www.example.com/static/"
+ "/var/www/static/";</pre>
+</dl>
+
+<p>
+ The filesystem path must be an absolute path.
+</p>
+<p>
+ You can specify multiple <code>LoadFromFile</code> associations in
+ configuration files. Note that large numbers of such directives may impact
+ performance.
+</p>
+<p>
+ If the sub-resource cannot be loaded from file in the directory
+ specified, the sub-request will fail (rather than fall back to
+ HTTP fetch). Part of the reason for this is to indicate a configuration
+ error more clearly.
+</p>
+<p>
+ As an added benefit. If resources are loaded from file, the rewritten
+ versions will be updated immediately when you change the associated file.
+ Resources loaded via normal HTTP fetches are refreshed only when they
+ expire from the cache (by default every 5 minutes). Therefore, the
+ rewritten versions are only updated as often as the cache is refreshed.
+ Resources loaded from file are not subject to caching behavior because
+ they are accessed directly from the filesystem for every request for the
+ rewritten version.
+</p>
+
+<p>
+ See also <a href="#mapping_origin"><code>MapOriginDomain</code></a>.
+</p>
+
+<p>
+ This directive can <strong>not</strong> be used
+ in <a href="configuration#htaccess">location-specific configuration
+ sections</a>.
+</p>
+
+<h4 id="limiting-load-from-file">Limiting Direct Loading</h4>
+<p>
+ A mapping set up with <code>LoadFromFile</code> allows filesystem loading for
+ anything it matches. If you have directories or file types that cannot be
+ loaded directly from the filesystem, <code>LoadFromFileRule</code> lets you
+ add fine-grained rules to control which files will be loaded directly and
+ which will fall back to the standard process, over HTTP.
+</p>
+<p>
+ When given a URL PageSpeed first determines whether any LoadFromFile
+ mappings apply. If one does, it calculates the mapped filename and checks for
+ applicable LoadFromFileRules. Considering rules in the reverse order of
+ definition, it takes the first applicable one and uses that to determine
+ whether to load from file or fall back to HTTP.
+</p>
+<p>
+ Some examples may be helpful. Consider a website that is entirely static
+ content except for a <code>/cgi-bin</code> directory:
+</p>
+<pre>
+ /var/www/index.html
+ /var/www/pets.html
+ /var/www/images/cat.jpg
+ /var/www/stylesheets/main.css
+ /var/www/stylesheets/ie.css
+ /var/www/cgi-bin/guestbook.pl
+ /var/www/cgi-bin/visitcounter.pl
+</pre>
+<p>
+ While most of the site can be loaded directly from the
+ filesystem, <code>guestbook.pl</code> and <code>visitcounter.pl</code> are
+ perl files that need to be interpreted before serving. Adding a rule
+ disallowing the <code>/cgi-bin</code> directory tells us to fall back to HTTP
+ appropriately:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLoadFromFile http://example.com/ /var/www/
+ModPagespeedLoadFromFileRule Disallow /var/www/cgi-bin/</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LoadFromFile http://example.com/ /var/www/;
+pagespeed LoadFromFileRule Disallow /var/www/cgi-bin/;</pre>
+</dl>
+
+<p>
+ The <code>LoadFromFileRule</code> directive takes two arguments.
+ The first must be either <code>Allow</code> or <code>Disallow</code> while the
+ second is a prefix that specifies which filesystem paths it should apply to.
+ Because the default is to allow loading from the filesystem for all paths
+ listed in any <code>LoadFromFile</code> statement, most of the time you will
+ be using <code>Disallow</code> to turn off filesystem loading for some subset
+ of those paths. You would use <code>Allow</code> only after
+ a <code>Disallow</code> that was overly general.
+</p>
+<p>
+ Not all sites are well suited for prefix-based control. Consider a site with
+ PHP files mixed in with ordinary static files:
+</p>
+<pre>
+ /var/www/index.html
+ /var/www/webmail.php
+ /var/www/webmail.css
+ /var/www/blog/index.php
+ /var/www/blog/header.png
+ /var/www/blog/blog.css
+</pre>
+<p>
+ Blacklisting just the <code>.php</code> files so they fall back to an HTTP
+ fetch allows everything else to be loaded directly from the filesystem:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLoadFromFile http://example.com/ /var/www/
+ModPagespeedLoadFromFileRuleMatch Disallow \.php$</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LoadFromFile http://example.com/ /var/www/;
+pagespeed LoadFromFileRuleMatch Disallow \.php$;</pre>
+</dl>
+
+<p>
+ The <code>LoadFromFileRuleMatch</code> directive also takes two arguments.
+ The first is either <code>Allow</code> or <code>Disallow</code> and functions
+ just like for <code>LoadFromFileRule</code> above. The second argument,
+ however, is
+ a <a href="https://github.com/google/re2/wiki/Syntax">RE2-format</a> regular
+ expression instead of a file prefix. Remember to escape characters that have
+ special meaning in regular expressions. For example, if instead
+ of <code>\.php$</code> we had simply <code>.php$</code> then a file
+ named <code>example.notphp</code> would still be forced to load over HTTP
+ because "<code>.</code>" is special syntax for "match any single character".
+</p>
+<p>
+ Consider a site with the opposite problem: a few file types can be reliably
+ loaded from file but the rest need interpretation first. For example:
+</p>
+<pre>
+ /var/www/index.html
+ /var/www/site.css
+ /var/www/script-using-ssi.js
+ /var/www/generate-image.pl
+ /var/www/
+</pre>
+<p>
+ This site uses server side includes
+ (<a href="http://httpd.apache.org/docs/2.2/howto/ssi.html">Apache</a>,
+ <a href="http://wiki.nginx.org/HttpSsiModule">Nginx</a>)
+ in its javascript and <code>generate-image.pl</code> needs to be interpreted
+ to make images. The only resources on the site that are generally safe to
+ load are <code>.css</code> ones. By first blacklisting everything and then
+ whitelisting only the <code>.css</code> files, we can make PageSpeed do this:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLoadFromFile http://example.com/ /var/www/
+ModPagespeedLoadFromFileRuleMatch disallow .*
+ModPagespeedLoadFromFileRuleMatch allow \.css$</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LoadFromFile http://example.com/ /var/www/;
+pagespeed LoadFromFileRuleMatch disallow .*;
+pagespeed LoadFromFileRuleMatch allow \.css$;</pre>
+</dl>
+
+<p>
+ This works because order is significant: later rules take precedence over
+ earlier ones.
+</p>
+
+<h3 id="LoadFromFileScriptVariables">Script Variables with LoadFromFile</h3>
+<p class="note"><strong>Note: New feature as of 1.9.32.1</strong></p>
+<p class="note"><strong>Note: Nginx-only</strong></p>
+
+<p>
+ As of 1.9.32.1 Nginx <a href="http://nginx.org/en/docs/varindex.html">script
+ variables</a> are now supported with the various <code>LoadFromFile</code>
+ directives. Script support for those options makes it possible to configure a
+ generic mapping of http hosts to disk, to reduce the amount of configuration
+ required when you want to load as much from disk as possible but have a lot
+ of <code>server{}</code> blocks.
+</p>
+
+<p>
+ As an example, consider one server that hosts three sites, each of which have
+ a directory <code>/static</code> that holds static resources and can be loaded
+ from file. One way to configure this server would be:
+</p>
+
+<dl>
+ <dt>Nginx:<dd><pre class="prettyprint">
+http {
+ ...
+ server {
+ server_name a.example.com;
+ pagespeed LoadFromFile http://a.example.com/static /var/www-a/static;
+ ...
+ }
+ server {
+ server_name b.example.com;
+ pagespeed LoadFromFile http://b.example.com/static /var/www-b/static;
+ ...
+ }
+ server {
+ server_name c.example.com;
+ pagespeed LoadFromFile http://c.example.com/static /var/www-c/static;
+ ...
+ }
+}</pre>
+</dl>
+
+<p>
+ For three sites this is kind of annoying, but the more sites you have the
+ worse it gets. With <code>ProcessScriptVariables</code> you can define one
+ generic <code>LoadFromFile</code> mapping instead of defining each one
+ individually:
+</p>
+
+<dl>
+ <dt>Nginx:<dd><pre class="prettyprint">
+http {
+ ...
+ pagespeed ProcessScriptVariables on;
+ pagespeed LoadFromFile "http://$host/static" "$document_root/static";
+
+ server {
+ server_name a.example.com;
+ ...
+ }
+ server {
+ server_name b.example.com;
+ ...
+ }
+ server {
+ server_name c.example.com;
+ ...
+ }
+}</pre>
+</dl>
+
+<p>
+ This will use Nginx's <code>$host</code> and <code>$document_root</code>
+ script variables instead of requiring you to explicitly code each one.
+</p>
+
+<p>
+ For more details on script variables, including how to handle dollar signs,
+ see <a href="system#nginx_script_variables">Script Variable Support</a>.
+</p>
+
+<h3 id="risks">Risks</h3>
+<p>
+ This should only be used for completely static resources which do not
+ need any custom headers or special server processing. If non-static
+ resources exist in the specified directory, the source code will
+ be used without applying SSI includes, CGI generation, etc.
+ Furthermore, all the resources should have filenames with common
+ extensions for their Content-Type (Ex: .html, .css, .js, .jpg, .jpeg, ... see
+ full list: <a href="https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/kernel/http/content_type.cc">content_type.cc</a>).
+</p>
+
+<h2 id="inline_without_auth">Inlining resources without explicit authorization
+</h2>
+<p>
+ Several filters in PageSpeed operate by inlining content from resources into
+ the HTML: inline_css, inline_javascript and prioritize_critical_css are a
+ few of the filters that operate in this manner. If resources from
+ third-party domains are not authorized explicitly, the effectiveness of
+ these filters decreases. For instance, prioritize_critical_css attempts to
+ remove blocking CSS requests needed for the initial render by inlining
+ critical CSS snippets into the HTML, however, the CSS resources that are not
+ authorized will continue to block. This option allows such resources to
+ be inlined without having to authorize all the individual domains.
+</p>
+<p>
+ The <code>InlineResourcesWithoutExplicitAuthorization</code>
+ directive can be used to allow resources from third-party domains to be
+ inlined into the HTML without requiring explicit authorization for each
+ domain. This option is "off" by default, and takes a
+ comma-separated list of strings representing resource categories for which
+ the option should be enabled. The list of valid resource categories is
+ given <a href="#categories">here</a>. Currently, only Script and
+ Stylesheet resource types are supported for this option.
+</p>
+
+This option can be enabled as follows:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedInlineResourcesWithoutExplicitAuthorization Script,Stylesheet
+</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed InlineResourcesWithoutExplicitAuthorization Script,Stylesheet;
+</pre>
+</dl>
+
+ <p class="warning"><strong>Warning: </strong>Enabling
+ <code>InlineResourcesWithoutExplicitAuthorization</code> could permit
+ hostile third parties to access any machine and port that the server running
+ mod_pagespeed has access to, including potentially those behind firewalls.
+ Please read the following information for details.
+ </p>
+<p>
+ This directive should only be enabled if all of the following conditions are
+ met for the resource types for which this option is enabled:
+</p>
+<ol>
+<li>The webmaster is confident that the resources referenced on their pages are
+ from trusted domains only.
+</li>
+<li>The site does not allow user-injected resources for the enabled resource
+ types.
+</li>
+<li>Fetches from the PageSpeed server should have no
+ more access to machines or ports than anyone on the Internet, and machines it
+ can access should not treat its traffic specially. Specifically, the
+ PageSpeed servers should not be able to access anything that is internal to a
+ firewall. Please refer to <a href="#fetch_servers">
+ Fetch server restrictions</a> sections for more details.
+</li>
+</ol>
+
+<p>
+ Note that resources inlined into HTML via this option will not be accessible
+ directly via a pagespeed URL, since that involves different security risks.
+ Resources will also not be inlined into other non-HTML resources via this
+ option. This means that flatten_css_imports will not flatten third-party CSS
+ into another CSS resource, unless the relevant third-party domains are
+ authorized explicitly via one of the techniques mentioned in the previous
+ sections.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/download.html b/doc/download.html
new file mode 100644
index 0000000..1b601f8
--- /dev/null
+++ b/doc/download.html
@@ -0,0 +1,133 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Installing From Packages</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Installing From Packages</h1>
+<p class="note">
+ If you're using Nginx you need
+ to <a href="build_ngx_pagespeed_from_source">build from source</a>. These
+ packages are Apache-only.
+</p>
+<p class="note">
+ Any releases offered here are pre-apache releases. The incubating project
+ is working to produce its first release.
+</p>
+
+<div id="downloads">
+<dl>
+ <dt>Latest Beta Version</dt>
+ <dd>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb">mod_pagespeed 32-bit .deb (Debian/Ubuntu)</a></div>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb">mod_pagespeed 64-bit .deb (Debian/Ubuntu)</a></div>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.rpm">mod_pagespeed 32-bit .rpm (CentOS/Fedora)</a></div>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm">mod_pagespeed 64-bit .rpm (CentOS/Fedora)</a></div>
+ </dd>
+ <dt>Latest Stable Version</dt>
+ <dd>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb">mod_pagespeed 32-bit .deb (Debian/Ubuntu)</a></div>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb">mod_pagespeed 64-bit .deb (Debian/Ubuntu)</a></div>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm">mod_pagespeed 32-bit .rpm (CentOS/Fedora)</a></div>
+<div class=download><a href="https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm">mod_pagespeed 64-bit .rpm (CentOS/Fedora)</a></div>
+ </dd>
+</dl>
+</div>
+
+<h3>Supported platforms</h3>
+<ul>
+<li>CentOS/Fedora (32-bit and 64-bit)</li>
+<li>Debian/Ubuntu (32-bit and 64-bit)</li>
+</ul>
+
+<p>To install the packages, on Debian/Ubuntu, please run the following
+command:</p>
+<pre class="prettyprint lang-bsh">
+sudo dpkg -i mod-pagespeed-*.deb
+sudo apt-get -f install
+</pre>
+
+<p>For CentOS/Fedora, please execute:</p>
+<pre class="prettyprint">
+sudo yum install at # if you do not already have 'at' installed
+sudo rpm -U mod-pagespeed-*.rpm
+</pre>
+
+<p>Installing mod_pagespeed will add the Google repository so your system
+will automatically keep mod_pagespeed up to date. If you don't want Google's
+repository, do <code>sudo touch /etc/default/mod-pagespeed</code> before
+installing the package.</p>
+
+<p>You can also download a number of <a href="https://dl-ssl.google.com/page-speed/mod-pagespeed/mod_pagespeed_examples.tar.gz">system tests</a>. These are the same tests available on <a href="http://www.modpagespeed.com">ModPageSpeed.com</a>.</p>
+
+<h3>What is installed</h3>
+<ul>
+<li>The mod_pagespeed packages install two versions of the mod_pagespeed code
+itself, <code>mod_pagespeed.so</code> for Apache 2.2
+and <code>mod_pagespeed_ap24.so</code> for Apache 2.4.</li>
+<li>Configuration files: <code>pagespeed.conf</code>, <code>pagespeed_libraries.conf</code>, and (on Debian) <code>pagespeed.load</code>. If you modify one of these configuration files, that file will not be upgraded automatically in the future.</li>
+<li>A standalone JavaScript minifier <code>pagespeed_js_minify</code> based on
+the one used in mod_pagespeed, that can
+both <a href="build_from_source#js-minify">minify JavaScript</a>
+and <a href="filter-canonicalize-js#sample">generate metadata for library
+canonicalization</a>. </li>
+</ul>
+
+<h2>How to upgrade</h2>
+<p>To upgrade from a previous version, use the standard <code>yum</code> or
+<code>apt-get</code> update commands. For example:</p>
+<dl>
+ <dt>.rpm
+ <dd><pre>
+sudo yum update mod-pagespeed-beta # Or mod-pagespeed-stable
+sudo /etc/init.d/httpd restart</pre>
+ <dt>.deb
+ <dd><pre>
+sudo apt-get update
+sudo apt-get upgrade
+sudo /etc/init.d/apache2 restart</pre>
+</dl>
+
+<h2>How to Change Channels</h2>
+<p>To convert from one channel to another, uninstall one and re-install
+the other. For example, if you would like to move from stable to beta
+channel:</p>
+<dl>
+ <dt>.rpm
+ <dd><pre>
+sudo yum remove mod-pagespeed-stable
+sudo yum install mod-pagespeed-beta</pre>
+ <dt>.deb
+ <dd><pre>
+sudo apt-get remove mod-pagespeed-stable
+sudo apt-get install mod-pagespeed-beta</pre>
+</dl>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/downstream-caching.html b/doc/downstream-caching.html
new file mode 100644
index 0000000..179e43b
--- /dev/null
+++ b/doc/downstream-caching.html
@@ -0,0 +1,521 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Configuring Downstream Caches</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Configuring Downstream Caches</h1>
+<style>
+.diff-del { color: darkred }
+.diff-add { color: green }
+</style>
+
+<h2 id="standard">Standard Configuration</h2>
+ <p class="warning"><strong>Note: This feature is currently experimental.
+ Options and configuration described here are subject to change in future
+ releases. Please subscribe to the <a href="mailing-lists#announcements"
+ >announcements mailing list</a> to keep yourself informed of updates to
+ this feature.</strong></p>
+
+ <p>
+ By default PageSpeed serves HTML files with <code>Cache-Control: no-cache,
+ max-age=0</code> so that changes to the HTML and its resources are sent
+ fresh on each request. The HTML can be cached, however, if you:
+ <ul>
+ <li> Set up a <code>PURGE</code> handler in your cache.
+ <li> Tell PageSpeed the url for the <code>PURGE</code> handler.
+ <li> Have the cache set the <code>PS-CapabilityList</code> header
+ so PageSpeed will emit HTML that can be sent to any browser.
+ <li> Have the cache occasionally pass through requests to the origin with
+ the <code>PS-ShouldBeacon</code> header set.
+ </ul>
+ </p>
+
+ <p>
+ For example, if you're running a cache on port 80 that reverse proxies to
+ your site on port 8080, then you'd need to tell PageSpeed to send
+ its <code>PURGE</code> requests to port 80:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDownstreamCachePurgeLocationPrefix http://localhost:80</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed DownstreamCachePurgeLocationPrefix http://localhost:80;</pre>
+</dl>
+ <p>
+ You also need to give PageSpeed a key so it can allow the cache to request
+ rebeaconing without allowing external entities to do so:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDownstreamCacheRebeaconingKey "<your-secret-key>"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed DownstreamCacheRebeaconingKey "<your-secret-key>";</pre>
+</dl>
+ <p>
+ These are the only changes you need to make to the PageSpeed configuration
+ file, but before you restart you also need to make some changes to your
+ cache configuration. These vary by cache; below are configurations for
+ Varnish 3.x, Varnish 4.x, and Nginx's proxy_cache:
+ </p>
+<dl>
+ <dt>Varnish 3.x:<dd><pre class="prettyprint">
+acl purge {
+ # If PageSpeed isn't running on the same server as your cache, list the IP(s)
+ # of the PageSpeed machine(s) here.
+ "127.0.0.1";
+}
+sub vcl_recv {
+ # Tell PageSpeed not to use optimizations specific to this request.
+ set req.http.PS-CapabilityList = "fully general optimizations only";
+
+ # Don't allow external entities to force beaconing.
+ remove req.http.PS-ShouldBeacon;
+
+ # Authenticate the purge request by IP.
+ if (req.request == "PURGE") {
+ if (!client.ip ~ purge) {
+ error 405 "Not allowed.";
+ }
+ return (lookup);
+ }
+}
+
+# Mark HTML as uncacheable. If we can't send them purge requests they can't
+# cache our html.
+sub vcl_fetch {
+ if (beresp.http.Content-Type ~ "text/html") {
+ remove beresp.http.Cache-Control;
+ set beresp.http.Cache-Control = "no-cache, max-age=0";
+ }
+ return (deliver);
+}
+
+sub vcl_hit {
+ # Make purging happen in response to a PURGE request. This happens
+ # automatically in Varnish 4.x so we don't need it there.
+ if (req.request == "PURGE") {
+ purge;
+ error 200 "Purged.";
+ }
+
+ # 5% of the time ignore that we got a cache hit and send the request to the
+ # backend anyway for instrumentation.
+ if (std.random(0, 100) < 5) {
+ set req.http.PS-ShouldBeacon = "<your-secret-key>";
+ return (pass);
+ }
+}
+
+sub vcl_miss {
+ # Make purging happen in response to a PURGE request. This happens
+ # automatically in Varnish 4.x so we don't need it there.
+ if (req.request == "PURGE") {
+ purge;
+ error 200 "Purged.";
+ }
+
+ # Instrument 25% of cache misses.
+ if (std.random(0, 100) < 25) {
+ set req.http.PS-ShouldBeacon = "<your-secret-key>";
+ return (pass);
+ }
+}</pre>
+ <dt>Varnish 4.x:<dd><pre class="prettyprint">
+acl purge {
+ # If PageSpeed isn't running on the same server as your cache, list the IP(s)
+ # of the PageSpeed machine(s) here.
+ "127.0.0.1";
+}
+
+sub vcl_recv {
+ # Tell PageSpeed not to use optimizations specific to this request.
+ set req.http.PS-CapabilityList = "fully general optimizations only";
+
+ # Don't allow external entities to force beaconing.
+ unset req.http.PS-ShouldBeacon;
+
+ # Authenticate the purge request by IP.
+ if (req.method == "PURGE") {
+ if (!client.ip ~ purge) {
+ return (synth(405,"Not allowed."));
+ }
+ return (purge);
+ }
+}
+
+# Mark HTML as uncacheable. If we can't send them purge requests they can't
+# cache our html.
+sub vcl_backend_response {
+ if (beresp.http.Content-Type ~ "text/html") {
+ unset beresp.http.Cache-Control;
+ set beresp.http.Cache-Control = "no-cache, max-age=0";
+ }
+ return (deliver);
+}
+
+sub vcl_hit {
+ # 5% of the time ignore that we got a cache hit and send the request to the
+ # backend anyway for instrumentation.
+ if (std.random(0, 100) < 5) {
+ set req.http.PS-ShouldBeacon = "<your-secret-key>";
+ return (pass);
+ }
+}
+sub vcl_miss {
+ # Instrument 25% of cache misses.
+ if (std.random(0, 100) < 25) {
+ set req.http.PS-ShouldBeacon = "<your-secret-key>";
+ return (pass);
+ }
+}</pre>
+ <dt>Nginx proxy_cache:<dd><pre class="prettyprint">
+http {
+ # Define a mapping used to mark HTML as uncacheable.
+ map $upstream_http_content_type $new_cache_control_header_val {
+ default $upstream_http_cache_control;
+ "~*text/html" "no-cache, max-age=0";
+ }
+
+ server {
+ # PageSpeed's beacon dependent filters need the cache to let some requests
+ # through to the backend. This code below depends on the <a href="http://wiki.nginx.org/HttpSetMiscModule">ngx_set_misc</a>
+ # module and randomly passes 5% of traffic to the backend for rebeaconing.
+ set $should_beacon_header_val "";
+ set_random $rand 0 100;
+ if ($rand ~* "^[0-4]$") {
+ set $should_beacon_header_val "<your-secret-key>";
+ set $bypass_cache 1;
+ }
+
+ location / {
+ # existing proxy_pass
+ # existing proxy_cache
+ # existing proxy_cache_key
+
+ # What servers should we accept PURGE requests from? If PageSpeed isn't
+ # running on the same server as your cache, list the IP(s) of the
+ # PageSpeed machine(s) here.
+ #
+ # This requires rebuilding with the ngx_cache_purge module:
+ # https://github.com/FRiCKLE/ngx_cache_purge
+ proxy_cache_purge PURGE from 127.0.0.1;
+
+ # Mark HTML as uncacheable. If we can't send them purge requests they
+ # can't cache our html. Uses the map defined above.
+ proxy_hide_header Cache-Control;
+ add_header Cache-Control $new_cache_control_header_val;
+
+ # Tell PageSpeed not to use optimizations specific to this request.
+ proxy_set_header PS-CapabilityList "fully general optimizations only";
+
+ # See discussion of rebeaconing above.
+ proxy_cache_bypass $bypass_cache;
+ proxy_hide_header PS-ShouldBeacon;
+ proxy_set_header PS-ShouldBeacon $should_beacon_header_val;
+ }
+ }
+}</pre>
+</dl>
+
+<p>
+ When running with downstream caching all resources referenced from the HTML
+ will be cache-extended as usual, so if you have resources that need to be
+ cached for a short time then they can be stale. If so,
+ either <code>Disallow</code> those resources, so PageSpeed doesn't inline or
+ cache-extend them, or decrease the cache lifetime on your HTML.
+</p>
+
+<h2 id="additional">Additional Options</h2>
+
+The configuration above should be a good fit for most sites, but PageSpeed's
+downstream caching is highly configurable with many options that allow you to
+tweak it for your particular setup.
+
+<h3 id="beaconing">Beaconing</h3>
+<p>
+ Several filters such as
+ <a href="reference-image-optimize#inline_images">inline_images</a>,
+ <a href="filter-inline-preview-images">inline_preview_images</a>,
+ <a href="filter-lazyload-images">lazyload_images</a> and
+ <a href="filter-prioritize-critical-css">prioritize_critical_css</a>
+ depend extensively on client beacons to determine critical images and
+ CSS. When such filters are enabled, pages periodically have beaconing
+ JavaScript inserted as part of the rewriting process.
+ The <a href="#standard">standard configuration</a> passes through 5% of cache
+ hits to the backend with a <code>PS-ShouldBeacon</code> header set, so that
+ these filters can continue to receive the beacons they need.
+</p>
+<p>
+ If you have a high traffic site, 5% is probably a larger share than you need
+ for PageSpeed to receive sufficient beacons. In that case you can decrease
+ the percentage of traffic to pass through. For example, here's how you'd
+ decrease it to 2%:
+</p>
+<dl>
+ <dt>Varnish 3.x or 4.x:<dd><pre>
+<span class=diff-del>- if (std.random(0, 100) < 5) {</span>
+<span class=diff-add>+ if (std.random(0, 100) < 2) {</span></pre>
+ <dt>Nginx proxy_cache<dd><pre>
+<span class=diff-del>- if ($rand ~* "^[0-4]$") {</span>
+<span class=diff-add>+ if ($rand ~* "^[01]$") {</span></pre>
+</dl>
+<p>
+ Alternatively, you may be willing to give up the benefit of the
+ beaconing-dependent filters in exchange for never intentionally bypassing the
+ cache. If so, you should <a href="config_filters#beacons">turn off
+ beaconing</a> and beacon-dependent filters in PageSpeed:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+>ModPagespeedCriticalImagesBeaconEnabled false
+ModPagespeedDisableFilters prioritize_critical_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+>pagespeed CriticalImagesBeaconEnabled false;
+pagespeed DisableFilters prioritize_critical_css;</pre>
+</dl>
+<p>
+ Additionally you should remove the proxy config that handles beaconing:
+</p>
+<dl>
+ <dt>Varnish 3.x:<dd><pre><span class="diff-del"
+>- remove req.http.PS-ShouldBeacon;
+...
+- if (std.random(0, 100) < 5) {
+- set req.http.PS-ShouldBeacon = "<your-secret-key>";
+- return (pass);
+- }
+...
+- if (std.random(0, 100) < 25) {
+- set req.http.PS-ShouldBeacon = "<your-secret-key>";
+- return (pass);
+- }</span></pre>
+ <dt>Varnish 4.x:<dd><pre><span class="diff-del"
+>- unset req.http.PS-ShouldBeacon;
+...
+- sub vcl_hit {
+- if (std.random(0, 100) < 5) {
+- set req.http.PS-ShouldBeacon = "<your-secret-key>";
+- return (pass);
+- }
+- }
+- sub vcl_miss {
+- if (std.random(0, 100) < 25) {
+- set req.http.PS-ShouldBeacon = "<your-secret-key>";
+- return (pass);
+- }
+- }</span></pre>
+ <dt>Nginx proxy_cache<dd><pre><span class="diff-del"
+>- set $should_beacon_header_val "";
+- set_random $rand 0 100;
+- if ($rand ~* "^[0-4]$") {
+- set $should_beacon_header_val "<your-secret-key>";
+- set $bypass_cache 1;
+- }
+...
+- proxy_cache_bypass $bypass_cache;
+- proxy_hide_header PS-ShouldBeacon;
+- proxy_set_header PS-ShouldBeacon $should_beacon_header_val;</span></pre>
+</dl>
+
+
+<h3 id="ps-resource">PageSpeed Resources</h3>
+<p>
+ Because PageSpeed already caches its optimized resources, you may want to
+ exclude them caching by the downstream cache. If so, you can set:
+
+<dl>
+ <dt>Varnish 3.x and 4.x:<dd><pre><span class="diff-add"
+>+ if (req.url ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+") {
++ return (pass);
++ }</span></pre>
+ <dt>Nginx proxy_cache<dd><pre><span class="diff-add"
+>+ if ($uri ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+") {
++ set $bypass_cache "1";
++ }</span></pre>
+</dl>
+
+<p>
+ If you have enabled <a href="restricting_urls#url_signatures">URL signing</a>,
+ change the <code>10</code> in the regexp to <code>20</code> to account for the
+ additional characters in the hash.
+</p>
+
+<h3 id="ps-capabilitylist">PS-CapabilityList</h3>
+
+<p>
+ Typically PageSpeed will produce different HTML for different browsers. For
+ example, when responding to a request that has <code>Accept:
+ image/webp</code>, PageSpeed knows the requesting browser supports WebP and so
+ it can send these images, while if the <code>Accept</code> header doesn't
+ mention WebP then it will send JPEG or PNG. To suppress this behavior,
+ the <a href="#standard">standard configuration</a> above sets a header:
+</p>
+<pre>
+ PS-CapabilityList: fully general optimizations only
+</pre>
+<p>
+ This header can also be used to tell PageSpeed to make specific optimizations.
+ There are five capabilities PageSpeed can take advantage of that aren't
+ supported in all browsers, and it gives them each a code:
+</p>
+<table>
+ <tr><th>Capability<th>Code
+ <tr><td>Inline Images<td><code>ii</code>
+ <tr><td>Lazyload Images<td><code>ll</code>
+ <tr><td>WebP Images<td><code>jw</code>
+ <tr><td>Lossless WebP Images<td><code>ws</code>
+ <tr><td>Animated WebP Images<td><code>wa</code>
+ <tr><td>Defer Javascript<td><code>dj</code>
+</table>
+<p>
+ For example, you could include whether the <code>Accept</code> header
+ includes <code>image/webp</code> in your cache key, and then for the
+ fraction of traffic that claimed webp support send:
+</p>
+<pre>
+ PS-CapabilityList: jw:
+</pre>
+<p>
+ Every page would go through to your origin twice and be cached twice, once
+ processed with WebP support and once without.
+</p>
+<p>
+ You can combine multiple capabilities together with a comma. For example, if
+ you decided to make a cache fragment for Chrome 30+, which supports all of
+ these, for that fragment you would send:
+</p>
+<pre>
+ PS-CapabilityList: ll,ii,dj,jw,ws:
+</pre>
+<p>
+ For Firefox 4+, which supports all of these but WebP, you would send:
+</p>
+<pre>
+ PS-CapabilityList: ll,ii,dj:
+</pre>
+<p>
+ To use this header properly, however, you have to know which capabilities are
+ supported by which browsers in the version of PageSpeed you're using and craft
+ regular expressions to match exactly those ones. This is very difficult to do
+ in general because it involves duplicating the code in
+ <a href="https://github.com/apache/incubator-pagespeed-mod/blob/latest-stable/pagespeed/kernel/http/user_agent_matcher.cc"><code>user_agent_matcher.cc</code></a>
+ as regexes, but a simple division is:
+ <ul>
+ <li>Chrome 32+: <code>ll,ii,dj,jw,wa,ws</code>
+ <li>Firefox 4+, Safari, IE10 (but not IE11): <code>ll,ii,dj</code>
+ <li>Everything else: <code>fully general optimizations only</code>
+ </ul>
+</p>
+
+<h3 id="purge-get">Purging with GET</h3>
+
+<p>
+ If you're integrating PageSpeed with a cache that doesn't
+ support <code>PURGE</code> requests but does support purging in response to a
+ prefixed <code>GET</code> request, PageSpeed can support that. You would
+ configure your cache to treat a <code>GET</code> to
+ <code>/purge/foo/bar</code> as a request to purge <code>/foo/bar</code> and
+ configure PageSpeed as:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDownstreamCachePurgeLocationPrefix http://CACHE-HOST:PORT/purge
+ModPagespeedDownstreamCachePurgeMethod GET</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed DownstreamCachePurgeLocationPrefix http://CACHE-HOST:PORT/purge;
+pagespeed DownstreamCachePurgeMethod GET;</pre>
+</dl>
+
+<h3 id="purge-threshold">Purge Threshold</h3>
+<p>
+ Whenever PageSpeed serves an HTML response that is not fully optimized it
+ continues rewriting in the background. When it finishes, if the HTML it
+ served was less than 95% optimized, it sends a purge request to the downstream
+ cache. The next request to come in will bypass the cache and come back to
+ PageSpeed where it can serve out the now more highly optimized page. If you
+ want to change what point PageSpeed considers the page done and stops
+ optimizing, you can set a different value for this threshold. For example, to
+ lower it to 80%, so that PageSpeed is satisfied with a page that is only 80%
+ optimized, you would set:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDownstreamCacheRewrittenPercentageThreshold 80</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed DownstreamCacheRewrittenPercentageThreshold 80;</pre>
+</dl>
+
+<h3 id="script-variables">Script Variables</h3>
+<p class="note"><strong>Note: Nginx-only</strong></p>
+<p class="note"><strong>Note: New feature as of 1.10.33.0</strong></p>
+
+<p>
+ In ngx_pagespeed <code>DownstreamCachePurgeLocationPrefix</code>,
+ <code>DownstreamCachePurgeMethod</code>, and
+ <code>DownstreamCacheRewrittenPercentageThreshold</code> support script
+ variables, so it's possible to set them on a per-request basis. Turn this on
+ with:
+<pre class="prettyprint">
+http {
+ pagespeed ProcessScriptVariables on;
+ ...
+}</pre>
+ You can then use script variables in arguments for these commands:
+<pre class="prettyprint">
+ pagespeed DownstreamCachePurgeLocationPrefix "$purge_location";
+ pagespeed DownstreamCachePurgeMethod "$cache_purge_method";
+ pagespeed DownstreamCacheRewrittenPercentageThreshold "$rewrite_threshold";</pre>
+</p>
+<p>
+ For more details on script variables, including how to handle dollar signs,
+ see <a href="system#nginx_script_variables">Script Variable Support</a>.
+</p>
+<h2 id="implementation">Implementation Details</h2>
+<p>
+ To support downstream caching PageSpeed sends a purge request to the caching
+ layer whenever it identifies an opportunity for more rewriting to be done on
+ content that was just served. Such opportunities could arise because of, say,
+ the resources now becoming available in the PageSpeed cache or an image
+ compression operation completing. The cache purge forces the next request for
+ the HTML file to come all the way to the backend PageSpeed server and obtain
+ better rewritten content, which is then stored in the cache. This interaction
+ between the PageSpeed server and the downstream caching layer is depicted in
+ the diagram given below.
+</p>
+ <img src="images/downstream_caching.png" >
+<p>
+ In the interaction depicted above, note that the partially optimized HTML will
+ be served from the cache until a purge request gets sent by the PageSpeed
+ server. It is recommended to set up PageSpeed and the downstream caching
+ layer servers on a one to one basis so that the purges can be sent to the
+ correct downstream server.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/experiment.html b/doc/experiment.html
new file mode 100644
index 0000000..af8933a
--- /dev/null
+++ b/doc/experiment.html
@@ -0,0 +1,449 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Experimenting with PageSpeed</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Experimenting with PageSpeed</h1>
+<h2 id="Framework">Experimental Framework</h2>
+<p>
+The <a href="module-run-experiment.html">Run Experiment</a> module allows you to
+gather data on what filters perform best for your site using A/B testing. It
+reports to your <a href="http://www.google.com/analytics/">Google Analytics</a>
+account, storing data in
+a <a href="/analytics/devguides/collection/gajs/gaTrackingCustomVariables">custom
+variable</a>. It often makes sense to first experiment manually using the
+per-request configuration described below to get an idea of which filters might
+help your site, and then <a href="module-run-experiment.html">run a controlled
+experiment</a> to test whether these filters actually speed it up in practice.
+</p>
+
+<h2 id="PerRequest">Per-request configuration</h2>
+
+<p>
+Query parameters, request headers, and response headers can be used to disable
+PageSpeed, specify the set of filters applied to an HTML page, and control some
+inlining limits.
+</p>
+
+<p>
+Query parameters take the form of <code>name=value</code>
+and parameters are separated by an ampersand (&). For example:
+</p>
+<pre>
+ <a href="http://modpagespeed.com/rewrite_css.html?PageSpeed=on&PageSpeedFilters=rewrite_css">http://modpagespeed.com/rewrite_css.html?PageSpeed=on&PageSpeedFilters=rewrite_css</a>
+</pre>
+
+<p>
+Request and response headers take the form of <code>name: value</code>
+and each header is on its own line. For example:
+</p>
+<pre class="prettyprint">
+GET /rewrite_css.html HTTP/1.1
+Host: modpagespeed.com
+PageSpeed: on
+PageSpeedFilters: rewrite_css</pre>
+
+<p>
+For backwards compatibility, these can start with <code>ModPagespeed</code>
+instead of <code>PageSpeed</code>, but this usage is deprecated.
+</p>
+
+<p>
+Query parameters can be added to the URL of the page or resource being
+fetched, request headers can be set in the request for pages and
+resources, and response headers can be set in the response of HTML
+pages (but not resources). These settings affect only the given
+request. If all three (query parameters and both headers) are used in
+the same request the query parameters will be applied first, followed
+by the request headers, followed by the response headers. Later
+settings override earlier settings but a filter disable in any
+location always overrides subsequent enables.
+</p>
+
+<p>
+There are two supported methods of adding response headers that PageSpeed will
+be able to observe and process. The first is to add response headers with a
+content handler such as PHP or Perl. The second is to add response headers at
+an origin server and run PageSpeed as a proxy in front of it. The use of
+mod_headers (Apache) or add_header (Nginx) on the same webserver as PageSpeed
+will not work because headers will be inserted after PageSpeed has already
+processed the page.
+</p>
+
+<h3 id="StickyQueryParams">Sticky Query Parameters</h3>
+<p>
+Query parameters can be set to be "sticky" and persist across
+requests using cookies. Sticky query parameters can be set by providing the
+sticky query parameter option in a request, and the server will respond with
+a cookie, valid for the duration specified in the PageSpeed configuration.
+</p>
+<p>
+To prevent abuse, a "secret token" must be provided in the initial
+request to enable setting cookies.
+</p>
+<dl>
+<dt>Apache:</dt>
+<dd>
+<pre class="prettyprint">ModPagespeedStickyQueryParameters example_token</pre>
+</dd>
+<dt>Nginx:</dt>
+<dd>
+<pre class="prettyprint">pagespeed StickyQueryParameters example_token</pre>
+</dd>
+</dl>
+<p>
+The duration, in milliseconds, for which the cookie will be valid can be set in
+the PageSpeed configuration.
+</p>
+<dl>
+<dt>Apache:</dt>
+<dd>
+<pre class="prettyprint">ModPagespeedOptionCookiesDurationMs 12345</pre>
+</dd>
+<dt>Nginx:</dt>
+<dd>
+<pre class="prettyprint">pagespeed OptionCookiesDurationMs 12345</pre>
+</dd>
+</dl>
+<p>
+The request must specify the token in a query parameter,
+for example:
+<pre>
+<a href="http://modpagespeed.com/rewrite_css.html?PageSpeedStickyQueryParameters=example_token&PageSpeedFilters=+remove_comments">http://modpagespeed.com/rewrite_css.html?PageSpeedStickyQueryParameters=example_token&PageSpeedFilters=+remove_comments</a></pre>
+<p>
+A request with the proper sticky query parameter token will cause the server to
+respond with a <code>Set-Cookie</code> in the response.
+Any request not containing the correct token will not receive the
+<code>Set-Cookie</code> response. Future responses with the received cookie will
+also enable the options set in the query parameter with the sticky query
+parameter. In this case, the <code>remove-comments</code> filter would be
+enabled.
+</p>
+
+<h3 id="ModPagespeed">Enabling and disabling PageSpeed</h3>
+
+<p>Query parameters:</p>
+<pre class="prettyprint">
+ PageSpeed=off
+ PageSpeed=on
+</pre>
+<p>Request & Response headers:</p>
+<pre class="prettyprint">
+ PageSpeed: off
+ PageSpeed: on
+</pre>
+<p>
+The first line disables PageSpeed rewriting, the second line enables it.
+</p>
+
+<h3 id="ModPagespeedFilters">Specifying the filters applied</h3>
+
+<p>Query parameters:</p>
+<pre class="prettyprint">
+ PageSpeedFilters=<i>comma-separated list of names</i>
+</pre>
+<p>Request & Response headers:</p>
+<pre class="prettyprint">
+ PageSpeedFilters: <i>comma-separated list of names</i>
+</pre>
+
+<p>
+This specifies the set of filters to apply to the page. The list of settings
+includes all filter names and a few shortcut names:
+</p>
+
+<ul>
+ <li><code>core</code> sets the rewrite level (per
+ <code><a href="config_filters.html#level>ModPagespeedRewriteLevel"
+ >RewriteLevel</a></code>)
+ to <code>CoreFilters</code>. This enables the core set of filters.</li>
+ <li><code>testing</code> enables all filters that are in the
+ <code>TestingCoreFilters</code> level but are not in the
+ <code>CoreFilters</code> level - this is not the same as setting the
+ level to <code>TestingCoreFilters</code> because that includes all
+ core filters, but the same effect can be achieved by specifying
+ both: <code>core,testing</code>.</li>
+ <li><code>rewrite_images</code> enables the following filters:
+ <code>inline_images</code>, <code>recompress_images</code>, and
+ <code>resize_images</code>.</li>
+ <li><code>extend_cache</code> enables the following filters:
+ <code>extend_cache_css</code>, <code>extend_cache_images</code>, and
+ <code>extend_cache_scripts</code>.</li>
+ <li><code>rewrite_javascript</code> enables the following filters:
+ <code>rewrite_javascript_external</code> and
+ <code>rewrite_javascript_inline</code>.</li>
+</ul>
+
+<p>
+When any filter is specified without a "<code>+</code>" or
+"<code>-</code>", any filters not explicitly enabled are
+disabled. Filters and shortcuts can be explicitly disabled by
+preceding the name by a minus sign ('-'), which is useful
+after using a shortcut. For example,
+"<code>core,-combine_css</code>" enables all the core
+filters
+<em>except</em> <code>combine_css</code>.
+</p>
+
+<p>
+If all names are prefixed with "<code>+</code>" or "<code>-</code>" then the
+filter set is incrementally adjusted from the current system settings based on
+the configuration files. For example, in a server
+with <code>RewriteLevel</code> set to <code>CoreFilters</code>, the query-string
+</p>
+<pre class="prettyprint">
+ ?PageSpeedFilters=+lazyload_images,-inline_images
+</pre>
+<p>
+will leave all the core filters enabled, but will add lazyload_images
+and disable inline images.
+</p>
+
+<h3 id="ModPagespeedFilters">Controlling inlining limits</h3>
+
+<p>Query parameters:</p>
+<pre class="prettyprint">
+ PageSpeedCssFlattenMaxBytes=<i>value</i>
+ PageSpeedCssImageInlineMaxBytes=<i>value</i>
+ PageSpeedCssInlineMaxBytes=<i>value</i>
+ PageSpeedImageInlineMaxBytes=<i>value</i>
+ PageSpeedJsInlineMaxBytes=<i>value</i>
+</pre>
+<p>Request & Response headers:</p>
+<pre class="prettyprint">
+ PageSpeedCssFlattenMaxBytes: <i>value</i>
+ PageSpeedCssImageInlineMaxBytes: <i>value</i>
+ PageSpeedCssInlineMaxBytes: <i>value</i>
+ PageSpeedImageInlineMaxBytes: <i>value</i>
+ PageSpeedJsInlineMaxBytes: <i>value</i>
+</pre>
+
+<p>
+These specify the limits for the following inlining options:
+</p>
+
+<ul>
+ <li><code>PageSpeedCssFlattenMaxBytes</code> sets the maximum size of CSS
+ files that will be flattened.</li>
+ <li><code>PageSpeedCssImageInlineMaxBytes</code> sets the maximum
+ size of images inside CSS. For inline CSS in HTML files, the
+ value used is the smaller of this value
+ or <code>PageSpeedImageInlineMaxBytes</code>.
+ <li><code>PageSpeedCssInlineMaxBytes</code> sets the maximum size of CSS
+ files that will be inlined.</li>
+ <li><code>PageSpeedImageInlineMaxBytes</code> sets the maximum size of
+ image files that will be inlined.</li>
+ <li><code>PageSpeedJsInlineMaxBytes</code> sets the maximum size of
+ JavaScript files that will be inlined.</li>
+</ul>
+
+<p>
+Here is an example that combines many of the above query parameters to enable
+all the core filters <em>except</em> the cache extension filters, and sets the
+JavaScript inlining limit to a high value so that most JavaScript files will
+be inlined:
+</p>
+<pre>
+ http://..../index.html?PageSpeedFilters=core,-extend_cache&PageSpeedJsInlineMaxBytes=102400
+</pre>
+
+<h3 id="Client-Options">Client options in queries and headers</h3>
+ <p>
+ This is an experimental option, its name and values are subject to change.
+ This option allows the client to customize the optimizations applied to a
+ request and can be used in a header or query parameter.
+ </p>
+
+ <p>As a query parameter:</p>
+<pre class="prettyprint">
+ X-PSA-Client-Options=<i>client-options</i>
+</pre>
+<p>As a Request or Response header:</p>
+<pre class="prettyprint">
+ X-PSA-Client-Options: <i>client-options</i>
+</pre>
+
+<p>
+The format of client-options is
+</p>
+<pre>
+ name1=value1,name2=value2, ...
+</pre>
+
+<p>
+The order of the name-value pairs does not matter. The supported options are:
+</p>
+
+<pre>
+ v=1
+</pre>
+<p>Version of the header. '1' is the only supported version for now.</p>
+<pre>
+ <code>m=integer-value</code>
+</pre>
+<p> Mode. Valid values are</p>
+ <ul>
+ <li> <code>0</code>, the client prefers that the server operates in its
+ default mode. </li>
+ <li> <code>1</code>, the client prefers that no image is transformed. </li>
+ <li> <code>2</code>, the client prefers that no resource is transformed.
+ This is equivalent to "?PageSpeedFilters=" in the request URL </li>
+ </ul>
+
+<pre>
+ <code>iqp=integer-value</code>
+</pre>
+<p> Image quality preference. Valid values are </p>
+ <ul>
+ <li> <code>0</code>, the client prefers that the server uses its own default
+ image quality. </li>
+ <li> <code>1</code>, the client prefers low image quality. </li>
+ <li> <code>2</code>, the client prefers medium image quality. </li>
+ <li> <code>3</code>, the client prefers high image quality. </li>
+ </ul>
+
+<h3 id="restrict-request-options">Restrict per-request configuration</h3>
+ <p class="note">
+ <strong>Note: New feature as of 1.9.32.1</strong>
+ </p>
+ <p>
+ Interpretation of PageSpeed query parameters and headers can be restricted to
+ requests specifying a request option override token.
+ The token is specified in the server configuration file and disallows
+ request option overriding when the request does not specify the correct token.
+ This option can be used to reduce the attack surface of denial of service
+ attacks.
+ </p>
+ <dl>
+ <dt>Apache:</dt>
+ <dd>
+ <pre class="prettyprint">ModPagespeedRequestOptionOverride example_token</pre>
+ </dd>
+ <dt>Nginx:</dt>
+ <dd>
+ <pre class="prettyprint">pagespeed RequestOptionOverride example_token</pre>
+ </dd>
+ </dl>
+ <p>
+ This feature provides a mechanism to restrict the ability for filters and
+ options to be specified in query parameters and request headers.
+ To enable it, an override token must be specified in the configuration file,
+ and requests must specify the same token for filters and options to be
+ applied.
+ Query parameters, except for <code>PageSpeed=on</code>,
+ <code>PageSpeed=off</code>, or <code>PageSpeed=noscript</code> will then only
+ be interpreted when accompanied by the correct
+ <code>RequestOptionOverride</code> token. For example, the rewrite_css filter
+ would be used in this example.
+ </p>
+ <p>
+ The request must specify the token in a query parameter or header,
+ for example:
+ <pre>
+ <a href="http://modpagespeed.com/rewrite_css.html?PageSpeed=on&PageSpeedFilters=rewrite_css&PageSpeedRequestOptionOverride=example_token">http://modpagespeed.com/rewrite_css.html?PageSpeed=on&PageSpeedFilters=rewrite_css&PageSpeedRequestOptionOverride=example_token</a></pre>
+ <p>
+ Any request not containing the correct <code>RequestOptionOverride</code>
+ token or not containing a <code>RequestOptionOverride</code> token will ignore
+ all other PageSpeed filters and options specified.
+ </p>
+ <p class="note">
+ <strong>
+ Note: even if applied, PageSpeed=on/off/noscript still takes effect.
+ </strong>
+ </p>
+</h3>
+
+<h3 id="noop">Noop query-parameter</h3>
+<p class="note">
+ <strong>Note: New feature as of 1.10.33.0</strong>
+</p>
+<p>
+To help bust browser caches, especially with experiments, any
+PageSpeed URL can accept the
+<code>PageSpeedNoop</code> query-paramter with an integer value. This
+query-parameter will be ignored by PageSpeed and stripped from the
+URL early in the processing flow. The origin will not see the <code>Noop</code>
+parameter, and PageSpeed's server-caches will not be affected. However, it
+will prevent your browser from using a cached value.
+</p>
+
+<p>Examples:</p>
+<pre class="prettyprint"
+ >http://images.example.com/foo.png?PageSpeedNoop=571
+http://www.example.com/index.html?q=foo&PageSpeedNoop=99438
+</pre>
+
+<h2 id="Configuring-mod_pagespeed_examples">
+ Configuring mod_pagespeed_examples</h2>
+<p class="note"><strong>Note: Apache-only</strong></p>
+
+<p>
+mod_pagespeed ships with a directory of sample HTML, JavaScript,
+Image, and CSS files to demonstrate the rewrite passes that it
+executes. These also form the basis of an installation smoke-test to
+ensure that the configured system is operating correctly. Assuming
+the files are installed in /var/www/mod_pagespeed_example, the
+following configuration file fragment will enable them to be served
+using reasonable caching headers.
+</p>
+<pre class="prettyprint lang-sh">
+ # These caching headers are set up for the mod_pagespeed example, and
+ # also serve as a demonstration of good values to set for the entire
+ # site, if it is to be optimized by mod_pagespeed.
+
+ <Directory /var/www/mod_pagespeed_example>
+ # To enable to show that mod_pagespeed to rewrites web pages, we must
+ # turn off Etags for HTML files and eliminate caching altogether.
+ # mod_pagespeed should rewrite HTML files each time they are served.
+ # The first time mod_pagespeed sees an HTML file, it may not optimize
+ # it fully. It will optimize better after the second view. Caching
+ # defeats this behavior.
+ <FilesMatch "\.(html|htm)$">
+ Header unset Etag
+ Header set Cache-control "max-age=0, no-cache"
+ </FilesMatch>
+
+ # Images, styles, and JavaScript are all cache-extended for
+ # a year by rewriting URLs to include a content hash.. mod_pagespeed,
+ # can only do this if the resources are cacheable in the first place.
+ # The origin caching policy, set here to 10 minutes, dictates how
+ # frequently mod_pagespeed must re-read the content files and recompute
+ # the content-hash. As long as the content doesn't actually change,
+ # the content-hash will remain the same, and the resources stored
+ # in browser caches will stay relevant.
+ <FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
+ Header unset Etag
+ Header set Cache-control "public, max-age=600"
+ </FilesMatch>
+ </Directory>
+</pre>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/faq.html b/doc/faq.html
new file mode 100644
index 0000000..fae2ab5
--- /dev/null
+++ b/doc/faq.html
@@ -0,0 +1,777 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Frequently Asked Questions</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Frequently Asked Questions</h1>
+<h2 id="other-servers">I'm not running Apache or Nginx, do you support my
+http server?</h2>
+
+<p>
+While we only support Apache and Nginx, there are community developed ports to
+several other webservers:
+</p>
+<ul>
+<li><a
+href="https://cwiki.apache.org/confluence/display/TS/ats_speed">Apache
+Traffic Server</a></li>
+<li><a href="http://www.iispeed.com/"
+>Internet Information Services (IIS)</a></li>
+<li><a
+href="http://open.litespeedtech.com/mediawiki/index.php/Help:Modules:PageSpeed"
+>OpenLiteSpeed</a></li>
+</ul>
+<p>
+If you run a webserver that doesn't have a port, one option would be to set up
+some other server running PageSpeed as a reverse proxy in front of it. If
+you're not sure which to use we recommend using PageSpeed on nginx, but any of
+these servers should work well as an optimizing reverse proxy.
+</p>
+<p>
+(And, of course, if you're interested in porting PageSpeed to a new server, that
+would be awesome, and anyone porting should feel free to send us lots of
+detailed technical questions!)
+</p>
+
+<h2 id="when-support">When will you support my favorite OS or protocol?</h2>
+
+<p>
+While we have no dates to announce for upcoming releases, we definitely want to
+know what you think we should be working
+on. Please <a href="https://github.com/apache/incubator-pagespeed-mod/issues">search
+our issues</a> for your feature. If you don't find
+it, <a href="https://github.com/apache/incubator-pagespeed-mod/issues/new">open a new
+issue</a> and tag it "Type-Enhancement". To get updates on an issue, click the
+"star" icon for it. This also lets us know how many people are interested in
+the issue. If your issue is Nginx-specific, consider posting on
+the <a href="https://github.com/apache/incubator-pagespeed-ngx/issues">ngx_pagespeed
+bug tracker</a>.
+</p>
+
+<h2 id="suse">Do you support SUSE?</h2>
+<p>
+We support SUSE on Apache and Nginx when <a href="build_from_source">building
+from source</a>. For Apache, Robert Munteanu (robert.munteanu@gmail.com) has
+set up a repository which publishes OpenSUSE RPMs for mod_pagespeed. The
+repository is
+hosted <a href="http://software.opensuse.org/package/apache2-mod_pagespeed">on
+OpenSUSE's build service instance</a>. The builds have seen some testing on one
+of Robert's servers (OpenSUSE 12.1/x86_64) but he'd appreciate anyone else
+testing it.
+</p>
+<p>
+To enable the module, install it, add <code>deflate pagespeed</code> to your
+list of Apache modules in <code>/etc/sysconfig/apache2</code> and restart
+Apache.
+</p>
+<p>
+Please note that the module is linked dynamically with the current system
+libraries and as such will bring in more dependencies than the 'stock' Fedora or
+CentOS RPM.
+</p>
+
+<h2 id="not-rewriting">Why isn't PageSpeed rewriting any of my pages?</h2>
+<p>
+Check the HTTP response headers from your HTML page:
+</p>
+<pre class="prettyprint lang-bsh">
+ curl -D- http://example.com | less
+</pre>
+<p>
+You should get something like:
+</p>
+<dl>
+ <dt>Apache:<dd>
+<pre>
+Date: Fri, 30 Sep 2016 15:36:57 GMT
+Server: Apache/2.4.7 (Ubuntu)
+...
+X-Mod-Pagespeed: 1.11.33.4-0
+...
+</pre>
+ <dt>Nginx:<dd>
+<pre>
+Date: Fri, 30 Sep 2016 15:37:24 GMT
+Server: nginx/1.11.4
+...
+X-Page-Speed: 1.11.33.4-0
+</pre>
+</dl>
+<p>
+If you don't see an <code>X-Mod-Pagespeed</code> header (Apache)
+or <code>X-Page-Speed</code> header (Nginx), this means that your webserver
+isn't letting PageSpeed run. This could be because it isn't actually installed,
+you don't have it turned on in the configuration file, or many other reasons.
+In Apache the problem might be that you have multiple
+<code>SetOutputFilter</code> directives: only one of those will win. See the
+Apache <a
+href="http://httpd.apache.org/docs/current/mod/core.html#SetOutputFilter"
+>SetOutputFilter documentation</a>.
+</p>
+<p>
+If you do see the header, but it doesn't look like PageSpeed is making any
+changes to your page, its possible that none of the active filters are finding
+anything to rewrite. Try comparing your page with PageSpeed off and with
+the <a href="filter-whitespace-collapse">collapse_whitespace</a> filter enabled:
+</p>
+<pre class="prettyprint">
+ curl -D- 'http://example.com?ModPagespeed=off' | less
+ curl -D- 'http://example.com?ModPagespeed=on&ModPagespeedFilters=collapse_whitespace' | less
+</pre>
+<p>
+If you see a change when run with <code>collapse_whitespace</code> on, that
+means PageSpeed is running but the filters you have selected aren't
+optimizing anything. There are several reasons that could happen:
+</p>
+<ul>
+ <li>The filters you have enabled aren't aggressive enough.</li>
+ <li>Your resources (images, css, javascript) aren't cacheable. If
+ PageSpeed sees <code>cache-control</code> headers such
+ as <code>nocache</code> or <code>private</code> it will not rewrite the
+ resources.</li>
+ <li>CSS, JavaScript, and image files served from a distinct domain from the
+ HTML must have the resource domain authorized. See
+ <a href="domains">Domains</a>.</li>
+ <li>Your CSS has new CSS3 syntax or other constructions we don't support.
+ See <a href="http://github.com/apache/incubator-pagespeed-mod/issues/108"
+ >issue 108</a>.
+ The <a href="filter-css-rewrite#configuration"
+ >fallback_rewrite_css_urls</a> filter may be able to help. You can also
+ use the <a href="build_from_source#debug-css">standalone CSS parser</a> to
+ help debug these issues.</li>
+ <li>Your resources are served over HTTPS. HTTPS resources can currently only
+ be rewritten if they are origin-mapped or loaded from directly from the
+ file-system. See <a href="https_support">HTTPS Support</a>.</li>
+</ul>
+
+<h2 id="missing-dependency">Why am I getting "Error: Missing Dependency: httpd > = 2.2" even though I have Apache 2.2.? installed?</h2>
+<p>
+ You are probably trying to install mod_pagespeed using yum or apt-get
+ (the .rpm or .deb binaries), but you installed Apache using a different
+ method (cPanel, Wordpress, etc.). This will not work because mod_pagespeed
+ binaries depend upon Apache being installed using yum or apt-get.
+</p>
+<p>
+ Instead you must either
+ <a href="build_mod_pagespeed_from_source">
+ build from mod_pagespeed from source
+ </a>
+ or <a href="http://www.google.com/">search</a> for mod_pagespeed + your
+ platform to see if someone has documented an install process for that
+ platform. For example,
+ <a href="#cpanel-install">cPanel based installation</a>.
+</p>
+
+<h2 id="cpanel-install">I'm using cPanel on my server, how do I install mod_pagespeed?</h2>
+<p>
+cPanel installs Apache httpd server from source via the built-in EasyApache setup
+and build process. In order to enable mod_pagespeed on your server, download
+and install the <a href="https://github.com/apache/incubator-pagespeed-cpanel">mod_pagespeed module
+ for cPanel WHM</a> - once the module is installed, you can select "mod_pagespeed" as
+one of the modules during the regular EasyApache build (via the online tool, or from
+the command line). Do not install mod_pagespeed from .deb. or .rpm packages - cPanel
+requires that you use the EasyApache build process.
+</p>
+
+<h2 id="wordpress-blank">I'm using WordPress and my pages are blank. Why?</h2>
+<p>
+Disable compression in the WordPress plugin, so that mod_pagespeed will process
+uncompressed HTML. mod_pagespeed ensures that its output will be compressed by
+enabling <a href="http://httpd.apache.org/docs/current/mod/mod_deflate.html"
+>mod_deflate</a>.
+</p>
+
+<h2 id="broken">PageSpeed broke my site; what do I do?</h2>
+<p>
+First of all, sorry about that. We put a lot of work into validating our
+rewriters against a large corpus of websites and we disable filters that cause
+problems as soon as we can, but sometimes things slip through.
+</p>
+<p>
+Second, please upgrade to the latest version; we are continually working on
+bug-fixes and turning off filters that break pages.
+</p>
+If it's still breaking your site, please post a bug
+(<a href="https://github.com/apache/incubator-pagespeed-mod/issues/new">Apache</a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/new">Nginx</a>). If
+you can, including the following information will make it much easier to
+diagnose:
+<ol>
+ <li>Try appending <code>?ModPagespeed=off</code> to the URL. This de-activates
+ PageSpeed. If the site is still broken, it is not a rewrite
+ or HTML parsing problem. It might be a configuration clash, please ask us
+ on our <a href="mailing-lists#discussion">discussion group</a>.</li>
+ <li>If that fixed the site, try
+ appending <code>?ModPagespeed=on&ModPagespeedFilters=</code> to the
+ URL. This turns on PageSpeed, but no filters. If the site is broken
+ now, it is an HTML parsing
+ problem. Please <a href="mailing-lists#discussion">let us know</a>.</li>
+ <li>If the site still worked, try
+ appending <code>?ModPagespeed=on&ModPagespeedFilters=foo</code> for
+ various filters "foo". For example try:
+ <pre class="prettyprint lang-bsh">
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=extend_cache
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=combine_css
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=inline_css
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=inline_javascript
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=insert_image_dimensions
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=rewrite_images
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=rewrite_css
+http://www.modpagespeed.com/?ModPagespeed=on&ModPagespeedFilters=rewrite_javascript</pre>
+ You may have to reload them a few times over several seconds to make sure
+ they have had time to load sub-resources into cache and rewrite them. If
+ one of these breaks your site, you now know which filter is at
+ fault. Please <a href="mailing-lists#discussion">let us know</a>. You can
+ disable that filter by adding a line to your <code>pagespeed.conf</code>
+ file:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDisableFilters foo</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed DisableFilters foo;</pre>
+</dl>
+ </li>
+</ol>
+
+<h2 id="mod_rewrite">I am getting 404s for rewritten resources
+ (like example.png.pagespeed.ic.LxXAhtOwRv.png) or for the
+ mod_pagespeed_admin console</h2>
+<p>
+ The most common reason that the rewritten resources 404 is because of
+ mod_rewrite <code>RewriteCond</code> rules. For example:
+</p>
+<pre class="prettyprint">
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^ /404 [L,R=301]</pre>
+<p>
+ This rule causes 404 for all requests which don't exist on the filesystem,
+ including mod_pagespeed rewritten resources and the mod_pagespeed admin
+ console.
+</p>
+<p>
+ In order to fix this you must add an exception for mod_pagespeed URLs:
+</p>
+<pre class="prettyprint">
+ RewriteCond %{REQUEST_URI} !pagespeed</pre>
+<p>
+ This will allow rewritten resources, the admin console and static resources
+ necessary for some filters.
+</p>
+
+<h2 id="ignores-changes">PageSpeed does not pick up changes when I edit CSS
+or JavaScript files</h2>
+<p>
+There are two distinct cache-times at play when you use PageSpeed:
+<ol>
+ <li>The origin TTL which PageSpeed uses to refresh its internal
+ server-side cache.</li>
+ <li>The TTL with which PageSpeed serves rewritten resources to
+ browsers.</li>
+</ol>
+When PageSpeed first reads your resource file, it uses the origin TTL to figure
+out how often to re-examine the origin CSS file. Assume your origin TTL is 1
+day. Once PageSpeed has that file in cache, it will not go back & re-check
+that file for a day. Changing the TTL after PageSpeed has put the resource in
+its cache will not help because PageSpeed is not going to reload the resource
+until the one in its cache expires, or you <a href="system#flush_cache">clear
+its cache</a>.
+</p>
+<p>
+We recommend an origin TTL of 10 minutes, which provides reasonable
+responsiveness when you update a file. If you try to make it much smaller, then
+your server will need to refresh it more frequently. This adds server load and
+reduces optimization.
+</p>
+<p>
+To see changes to your files more quickly while
+developing, <a href="system#flush_cache">flush the cache</a> on your server(s).
+</p>
+<p>
+If your environment allows you to
+enable <a href="domains#ModPagespeedLoadFromFile">LoadFromFile</a>,
+you can get the best of both worlds because PageSpeed can eliminate its
+internal server-side cache.
+</p>
+<h2 id="tiny-mce-errors">Why is PageSpeed giving me errors in jquery or
+js_tinyMCE?</h2>
+<p>
+Some JavaScript is introspective, being sensitive to its own name or the path
+it's loaded from. While PageSpeed has an internal list
+(<a href="https://github.com/apache/incubator-pagespeed-mod/blob/master/net/instaweb/rewriter/rewrite_options.cc">DisallowTroublesomeResources</a>)
+hardcoded with filenames of JavaScript libraries that are known to be
+problematic, and <a href="restricting_urls#aris">inspects the source of
+others</a> looking for dangerous constructs, it doesn't always correctly
+determine whether it is safe to rewrite a given file. If you have a file that
+is giving JavaScript errors, you can tell PageSpeed to leave it alone with
+<a href="restricting_urls">Disallow</a>.
+</p>
+<h2 id="name-resolution-failure">What's with all these "Serf" errors in my logs?
+Error status=670003 (Temporary failure in name resolution)</h2>
+<p>
+This can happen when the DNS cannot be accessed accurately from the server. Thus
+sub-resources cannot be fetched and rewritten correctly.
+</p>
+<p>
+To test that this is the case, <code>ssh</code> into your machine and <code>wget</code> a URL:
+</p>
+<pre class="prettyprint lang-bsh">
+ $ ssh YOUR_SITE
+ $ wget http://YOUR_SITE/
+</pre>
+<p>
+If this fails, then DNS is not accessible or there is some other networking
+issue stopping you from accessing your host from itself.
+</p>
+<p>
+One solution is to use <a href="domains#mapping_origin">origin-mapping</a> to
+indicate the host from which the resources should be fetched:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMapOriginDomain localhost www.example.com</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MapOriginDomain localhost www.example.com;</pre>
+</dl>
+<p>
+This bypasses DNS lookup by telling PageSpeed to get all resources for
+domain <code>www.example.com</code> from <code>localhost</code>.
+</p>
+<p>
+This can also be used to improve the performance of PageSpeed when it is
+sitting behind a load balancer. It may be preferable to use localhost to load
+the resources rather than going out to the load-balancer and back.
+</p>
+<h2 id="tmpfs">Can I move PageSpeed's file-based cache into RAM?</h2>
+<p>
+Why yes, you can. PageSpeed uses the file system for its cache
+implementation. There is no requirement that this be a physical disk. Disk
+pressure will be reduced and performance may be improved by using a memory-based
+file system.
+</p>
+<p>
+Put this in <code>/etc/fstab</code>, with the uid and guid set to the appropiate
+user and group of your webserver, and set path to your needs. Feel free to
+change the size; here it is 256Mb:
+<pre class="prettyprint lang-bsh">
+ tmpfs /path/to/pagespeed_cache tmpfs size=256m,mode=0775,uid=httpd,gid=httpd 0 0
+</pre>
+<p>
+Save it, and after that mount the tmpfs:
+</p>
+<pre class="prettyprint lang-bsh">
+ mount /path/to/pagespeed_cache
+</pre>
+<h2 id="configure-make">Why don't you allow source-installs in Apache via
+./configure && make?</h2>
+<p>
+mod_pagespeed is dependent on several other packages that
+use <code>gclient</code>. For us to switch away from this build methodology
+we'd have to either:
+</p>
+<ul>
+ <li>rewrite the functionality we get for free from other packages,
+ <b>or</b></li>
+ <li>get these packages to switch
+ methodologies <b>and</b> document for people installing from source that
+ they must <code>configure</code> and <code>make</code> about 10 other
+ packages before they could compile ours.</li>
+</ul>
+<p>
+To do either of those would cost us a lot of development time that we'd prefer
+to spend making PageSpeed better. The benefit of <code>gclient</code>,
+besides the above, is that it lets us control explicitly which library versions
+we link in, out of a large number of direct and transitive dependencies, helping
+us create a consistent experience for our source-code builds. If we had to ask
+our source-code installers to <code>configure</code> and <code>make</code>
+multiple dependent libraries there would likely be a lot of
+version-incompatibilities.
+</p>
+<p>
+We do support <code>./configure && make</code> in Nginx, but that only works
+because we package up a binary distribution of the PageSpeed Optimization
+Library and a "<a href="build_ngx_pagespeed_from_source">source</a>"
+installation only builds the ngx_pagespeed-specific files from source. When you
+want
+to <a href="https://github.com/apache/incubator-pagespeed-ngx/wiki/Building-PSOL-From-Source">build
+PSOL from source along with ngx_pagespeed</a> you still need to
+use <code>gclient</code>.
+</p>
+<h2 id="tracking-image">Why is my Google Analytics data being inflated by
+"Serf"?</h2>
+<p>
+If you track page views with a tracking image, you will need to explicitly tell
+PageSpeed not to try to fetch that image. For example if your tracking image
+were:
+</p>
+<pre class="prettyprint">
+ <img src="/ga.php?utmac=...">
+</pre>
+<p>
+you would add:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDisallow "*/ga.php*"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed Disallow "*/ga.php*";</pre>
+</dl>
+<p>
+to your configuration file.
+</p>
+<h2 id="mod_php">mod_pagespeed does not rewrite pages produced from mod_php</h2>
+<p>
+mod_pagespeed only rewrites pages specifically marked as <code>Content-Type:
+text/html</code> (and a few other HTML types). If you dynamically generate your
+pages from mod_php, PHP needs to set this header correctly.
+</p>
+<p>
+One way to do this is to use the PHP's <a href="http://php.net/manual/en/function.header.php">header function</a>:
+</p>
+<pre class="prettyprint">
+ <?php
+ header('Content-Type: text/html')
+ ?>
+</pre>
+<p>
+This code goes at the top of your php file.
+</p>
+<h2 id="meta_tags_and_xhtml">PageSpeed causes my page to display an <code>XML
+Parsing Error</code> message</h2>
+<p>
+This usually happens when using a content management or generation system
+(we've seen it with Munin and Magento for example). The full error message
+looks something like:
+</p>
+<pre class="prettyprint">
+ XML Parsing Error: mismatched tag. Expected: </li>.
+ Location: http://www.example.com/
+ Line Number 123, Column 4: </ul>
+</pre>
+<p>
+This happens when the generated content has a <code>meta</code> tag that
+identifies the content as XHTML but the content has markup that is not valid
+XHTML, <em>and</em> you have configured your webserver to set the content type
+to HTML, so the browser parses it as HTML and doesn't detect the invalid XHTML
+errors.
+</p>
+<p>
+However, when <code>convert_meta_tags</code> is enabled (and it's a core filter
+so is on by default), PageSpeed inserts a content header into the response
+with the value in the <code>meta</code> tag, namely XHTML
+(<code>application/xhtml+xml</code> to be precise), resulting in the browser
+displaying the error message because it is now parsing the page as XHTML and
+it rejects the invalid content.
+</p>
+<p>
+There are three solutions, in descending order of preference:
+<ul>
+<li>If the content is XHTML, write XHTML and validate it with an XHTML
+ validator.</li>
+<li>If the content is not XHTML, remove the <code>meta</code> tag that claims
+ it is.</li>
+<li>If the content is not XHTML but you can't remove the <code>meta</code> tag,
+ say because your CMS doesn't let you, disable the
+ <code>convert_meta_tags</code> filter in your <code>pagespeed.conf</code>:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDisableFilters convert_meta_tags</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed DisableFilters convert_meta_tags;</pre>
+</dl>
+</li>
+</ul>
+<h2 id="selinux_permissions">Why do I get <em>Permission denied</em> errors
+ in my log file on CentOS, RHEL, or any system using SELinux?</h2>
+<p>
+The symptom is many error messages in the webserver log file of the form (split
+across multiple lines here for readability):
+</p>
+<pre class="prettyprint">
+ [Mon Jan 01 02:03:04 2001] [error] [mod_pagespeed 1.0.22.7-2005 @1234]
+ /path/to/pagespeed_cache/randomgibberish.lock:0:
+ creating dir (code=13 Permission denied)
+</pre>
+<p>
+These are because SELinux by default restricts permissions of daemons for
+extra security, so you need to grant permission for the <code>httpd</code>
+or daemon to write to the cache directory:
+</p>
+<pre class="prettyprint">
+ chcon -R -t httpd_sys_content_t /path/to/pagespeed_cache
+</pre>
+This is for Apache; we're not sure what you need to do for Nginx.
+
+<h2 id="loopback_fetches">My logs contain messages about missing
+files requested from 224.0.0.0 and resources are not optimized, what's wrong?</h2>
+<p>
+
+For <a href="CVE-2012-4001">security reasons</a>, PageSpeed will only fetch
+from host names it is explicitly told about via its domain configuration
+directives and from 127.0.0.1, the loopback interface of the server it's running
+on. Many Apache configuration management tools, however, will configure virtual
+hosts to only listen on the external IP, which causes those fetches to fail.
+<p>
+If you are affected, the following options may be appropriate:
+<ul>
+ <li>Unless you have a reason not to, have your virtual hosts listen on all
+ interfaces: change the directives of the form
+ <code><VirtualHost 198.51.100.1:80></code> to the form
+ <code><VirtualHost *:80></code>
+ </li>
+ <li>For every virtual host, list its domain name(s) with the
+ <code>ModPagespeedDomain</code> directive inside its own
+ <code><VirtualHost></code> block. For example:
+ <pre class="prettyprint">
+<VirtualHost 198.51.100.1:80>
+ServerName www.example.com
+ModPagespeedDomain www.example.com
+</pre>
+ </li>
+ <li>For every virtual host, provide a <a href="domains#mapping_origin">
+ <code>ModPagespeedMapOriginDomain</code></a> directive giving where to load
+ its resources, for example:
+ <pre class="prettyprint">
+<VirtualHost 198.51.100.1:80>
+ServerName www.example.com
+ModPagespeedMapOriginDomain 198.51.100.1 www.example.com
+</pre>
+ </li>
+ <li>If you have <a href="configuration#virtual-hosts">
+ <code>ModPagespeedInheritVHostConfig on</code></a>, you can also provide the
+ origin mapping globally, which may be useful in combination with wildcards,
+ for example:
+ <pre class="prettyprint">
+ModPagespeedMapOriginDomain loadbalancer.example.com *.example.com
+</pre>
+
+ <p class="warning"><b>Warning:</b> You do not generally want to use
+ <code>Domain</code> globally as doing so will tell PageSpeed
+ that you consider all of these domains as mutually trusting.</p>
+ </li>
+ <li>If you are running a proxy or for some other reason cannot easily
+ enumerate all virtual hosts, it is possible to disable this behavior,
+ after taking some precautions. Please see
+ <a href="domains#fetch_servers">fetch server restrictions</a> for
+ more information.
+ </li>
+</ul>
+
+<h2 id="beacons">Why are rewritten pages sending POSTs back to my server?</h2>
+<p>
+Certain filters need to determine things about the page: in particular, the
+<code><a href="filter-lazyload-images">lazyload_images</a></code>,
+<code><a href="filter-inline-preview-images">inline_preview_images</a></code>,
+and <code><a href="reference-image-optimize#inline_images">inline_images</a>
+</code> filters need to determine which images are above the fold, and the
+<code><a href="filter-prioritize-critical-css">prioritize_critical_css</a>
+</code>filter needs to determine the CSS actually used by the page.
+<p>
+</p>To do this, the filters inject JavaScript into the rewritten HTML that
+analyzes the page in the browser and sends data back to mod_pagespeed using a
+POST method. The default target is <code>/mod_pagespeed_beacon</code> but that
+can be changed using the <code>
+<a href="filter-instrumentation-add#beacon_url">ModPagespeedBeaconUrl</a>
+</code> directive.
+</p>
+
+<h2 id="control_beacons">How do I enable or disable beacon POSTs being sent back
+to my server?</h2>
+<p>
+Filters that use the beacon automatically inject JavaScript to send the POST
+back to the server, and the POST handler is always enabled in mod_pagespeed,
+so there's nothing to do to enable beaconing.
+</p>
+<p>
+To disable the use of beacons by the image rewriting filters use the <code>
+<a href="config_filters#beacons">ModPagespeedCriticalImagesBeaconEnabled</a>
+</code> directive. If you disable image beacons but enable filters that use
+them, the filters will work but not as well as when beacons are enabled.
+<p>
+To disable the POST handler for all filters there are two options: either
+disable all the filters that use it, or use a
+<code><Location></code> directive to block it. Filters are disabled using
+<a href="config_filters#enabling">ModPagespeedDisableFilters</a>. An example
+<code><Location></code> directive to block all beacon POST handling that
+can be added to your <code>pagespeed.conf</code> file is:
+<pre class="prettyprint" id="disable_handler">
+ <Location /mod_pagespeed_beacon>
+ Order allow,deny
+ </Location>
+</pre>
+<p>
+If you block POSTs but enable filters that use beacons, depending on the filter
+it will either have limited functionality or have no useful effect, but in all
+cases pointless processing will occur in both the server and the browser, so
+you should disable and forbid these filters if you block POSTs.
+</p>
+<p class="note">
+<strong>Note:</strong>Even if you disable all filters that use beacons someone
+could use tools like <code>wget</code> or <code>curl</code> to send POSTs to
+your server. These will have no effect but they will require processing. If you
+want to completely disable POST handling use a <code><Location></code>
+directive.
+</p>
+
+<h2 id="noscript-redirect">Why is PageSpeed inserting a meta refresh to
+/?PageSpeed=noscript or /?ModPagespeed=noscript at the top of the page?</h2>
+<p>
+The <code><a href="filter-js-defer">defer_javascript</a></code>,
+<code><a href="filter-lazyload-images">lazyload_images</a></code>,
+<code><a href="filter-dedup-inlined-images">dedup_inlined_images</a></code>, and
+<code><a href="filter-local-storage-cache">local_storage_cache</a></code>
+filters require JavaScript to render pages correctly. To support clients that
+have JavaScript disabled, if any of these filters are enabled, PageSpeed will
+insert a meta refresh inside a <code>noscript</code> tag at the top of the page.
+This meta refresh will redirect clients with JavaScript disabled to the current
+URL with a '<code>?PageSpeed=noscript</code>' query parameter appended which
+disables filters that require JavaScript.
+</p>
+<p>
+If you wish to disable this redirect, for instance if your page already requires
+JS to function correctly, set the following option in your
+<code>pagespeed.conf</code>:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedSupportNoScriptEnabled false</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed SupportNoScriptEnabled false;</pre>
+</dl>
+</p>
+
+
+<h2 id="collapse-newlines">Why won't the <code>collapse_whitespace</code> filter
+remove newlines?</h2>
+
+<p>
+When removing whitespace from HTML, some website optimizers remove newlines
+entirely, but PageSpeed leaves them in. This isn't actually a problem with newlines,
+however, it's that it's not generally safe to remove a run of whitespace
+entirely. You can turn any number of consecutive whitespace characters into a
+single one, and we do that, but removing the whole run can make the site render
+differently.
+</p>
+
+<p>
+To take a simple example, consider:
+</p>
+
+<pre>
+ <body>
+ <h1>Hello World</h1>
+ Lorem ipsum dolor sit amet, consectetur
+ adipiscing elit. Fusce molestie ante <b>vitae</b>
+ iaculis varius. ...
+ </body>
+</pre>
+
+<p>
+PageSpeed with <code>collapse_whitespace</code> will turn this into:
+</p>
+
+<pre>
+<body>
+<h1>Hello World</h1>
+Lorem ipsum dolor sit amet, consectetur
+adipiscing elit. Fusce molestie ante <b>vitae</b>
+iaculis varius. ...
+</body>
+</pre>
+
+<p>
+If PageSpeed went further and put it all on one line, it would be
+converting <code><b>vitae</b> iaculis</code>
+into <code><b>vitae</b>iaculis</code>, which would change the
+rendering from "<b>vitae</b> iaculis" into "<b>vitae</b>iaculis"; one word
+instead of two. It would have been safe to turn <code><body>
+<h1>Hello World</h1></code> into <code><body><h1>Hello
+World</h1></code>, but doing one and not the other requires understanding
+the CSS (and JS) to the point where we can reliably tell that one pair of
+elements are <code>display: block</code> while the other pair
+are <code>display: inline</code>.
+</p>
+
+<h2 id="warning-fetch-rate">I've got a warning saying
+"Serf fetch failure rate extremely high". What does this mean?</h2>
+
+<p>The warning means that, when PageSpeed tried to fetch resources inside your
+web page for optimization, over 50% of attempts inside a 30-minute period
+failed. This may just mean you have some broken resource includes in your
+pages (in which case, it may be a good idea to fix them for better performance),
+but might indicate that PageSpeed's fetching is not working properly. If you
+have in-place resource optimization on, that can result in user requests for
+<code>.pagespeed.</code> URLs returning error 404 intermittently.</p>
+
+<p>First of all, check to see if the log mentions anything else about fetch
+trouble. If what's there is not helpful, the root cause may be more obvious
+if you follow these steps:</p>
+<ol>
+<li>Disable <a href="system#ipro">in-place resource optimization</a> temporarily.
+ </li>
+<li>Clear PageSpeed cache.</li>
+<li>Open a test page with a <code>?PagespeedFilters=+debug</code> query
+ parameter, reload it a few times, and see if resources are getting optimized,
+ and if not if there is an error message.
+<li>Revert the config changes.</li>
+</ol>
+
+<p>Most likely you may need to configure an <a href="domains#mapping_origin">
+origin domain, to specify the host or IP to talk to fetch resources.</p>
+
+<p>You may also want to consider using <a href="domains#ModPagespeedLoadFromFile">
+<code>LoadFromFile</code></a> functionality, as that performs much better if
+your resources are static.</p>
+
+<h2 id="varying-results">Sometimes pages are served as partially optimized. How can
+I achieve a more steady optimization ouput?</h2>
+
+<p>There are two (relatively) common situations that may lead up to a fluctuating
+level of optimization in the output:
+<ol>
+<li>Low traffic, combined with short http expiry times for image, css and javascript
+responses: <br/>
+Consider increasing the http expiry applied to the original
+resources, or set up <a href="domains#ModPagespeedLoadFromFile">LoadFromFile</a>
+to allow the module to load static files directly from disk.</li>
+<li>High cache churn rates:<br/>
+If PageSpeed's caches are sized too small, optimized assets falling out of the cache
+may cause frequent reoptimization. <a href="system#caching">Sizing the cache</a> to 3
+to 4 times the size of the original assets of the website should allow the module to
+cache all the original resources plus multiple optimized variants (for serving
+different user-agents and screen sizes).
+</li>
+<li>If the above did not help, the <a href="admin">admin pages</a> offer various tools
+that may assist in diagnosing what happens.</li>
+</ol>
+
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-attribute-elide.html b/doc/filter-attribute-elide.html
new file mode 100644
index 0000000..dc8ede5
--- /dev/null
+++ b/doc/filter-attribute-elide.html
@@ -0,0 +1,119 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Elide Attributes</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Elide Attributes</h1>
+
+
+<h2>Configuration</h2>
+<p>
+The 'Elide Attributes' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters elide_attributes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters elide_attributes;</pre>
+</dl>
+<p>
+in the configuration file.
+
+<h2>Description</h2>
+<p>
+The 'Elide Attributes' filter reduces the transfer size of HTML files
+by removing attributes from tags when the specified value is equal to
+the default value for that attribute. This can save a modest number of
+bytes, and may make the document more compressible by canonicalizing
+the affected tags.
+</p>
+
+<h2>Operation</h2>
+<p>
+There are two cases where an attribute value can be removed. First,
+some attributes are "single-valued" or "boolean", in that the value
+specified for the attribute is irrelevant -- all that matters is
+whether the attribute is present or not. In such cases, the filter
+will remove the value from the tag, leaving only the attribute name.
+</p>
+<p>
+For example, the following tag:
+</p>
+<pre class="prettyprint">
+ <button name="ok" disabled="disabled">
+</pre>
+<p>
+can be rewritten to:
+</p>
+<pre class="prettyprint">
+ <button name="ok" disabled>
+</pre>
+<p>
+The second case is an optional attribute with a default value. If an
+HTML attribute includes an explicit value for an attribute (perhaps to
+aid readability) that is equal to the default attribute, the filter
+will remove the attribute name and value, knowing that the browser
+will infer the intended attribute anyway. For example, the following
+tag:
+</p>
+<pre class="prettyprint">
+ <form method=get>
+</pre>
+<p>
+can be rewritten to:
+</p>
+<pre class="prettyprint">
+ <form>
+</pre>
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/elide_attributes.html?ModPagespeed=on&ModPagespeedFilters=elide_attributes">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+The 'Elide Attributes' filter must be wary of documents with an XHTML
+doctype, as removing the value from a single-valued attribute will
+result in invalid XHTML. The filter attempts to recognize XHTML
+doctype declarations and will disable this rewriting feature in such
+cases.
+</p>
+
+<h2>Risks</h2>
+<p>This filter is considered medium risk. It is safe for most pages, but
+ might break CSS formatting on certain pages that match on default attributes
+ that this filter removes. Further, JavaScript can be written that inspects
+ the DOM looking for the presence of certain attributes. Such JavaScript may
+ behave differently on a page which has removed otherwise unnecessary
+ attributes.</p>
+
+
+</div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-cache-extend-pdfs.html b/doc/filter-cache-extend-pdfs.html
new file mode 100644
index 0000000..2e88695
--- /dev/null
+++ b/doc/filter-cache-extend-pdfs.html
@@ -0,0 +1,83 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Extend Cache PDFs</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Extend Cache PDFs</h1><h2>Configuration</h2>
+<p>
+The 'Extend Cache PDFs' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters extend_cache_pdfs</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters extend_cache_pdfs;</pre>
+</dl>
+in the configuration file.
+
+<h2>Description</h2>
+<p>
+'Extend Cache PDFs' is a version of <a href="filter-cache-extend">Extend
+Cache</a> that acts on PDFs. Unlike 'Extend Cache' it applies not only to
+resources but also to hyperlinks. For example, while 'Extend Cache' would not
+apply to <code><a href="example.jpg"></code>, 'Extend Cache
+PDFs' would apply to <code><a href="example.pdf"></code>.
+</p>
+
+<h2>Operation</h2>
+<p>
+<a href="filter-cache-extend#operation">Extend Cache: Operation</a> describes
+the standard operation of cache extension in PageSpeed. This filter identifies
+PDF URLs by their ".pdf" extension and marks them as eligible for cache
+extension.
+</p>
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> for
+cache-extending PDFs
+<a
+href="https://www.modpagespeed.com/examples/extend_cache_pdfs.html?ModPagespeed=on&ModPagespeedFilters=extend_cache_pdfs"
+>in HTML</a>.
+</p>
+
+<h2>Limitations</h2>
+<p>
+In addition to the <a href="filter-cache-extend#limitations">limitations of
+Extend Cache</a>, this filter is limited by its reliance on file extensions for
+identifying potential PDF URLs. PDF resources with URLs ending in something
+other than ".pdf" won't be considered for cache extension.
+</p>
+<h2>Risks</h2>
+<p>
+This filter has the same risks as <a href="filter-cache-extend#risks">Extend
+Cache</a>.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-cache-extend.html b/doc/filter-cache-extend.html
new file mode 100644
index 0000000..82ed930
--- /dev/null
+++ b/doc/filter-cache-extend.html
@@ -0,0 +1,219 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Extend Cache</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Extend Cache</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Extend Cache' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters extend_cache</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters extend_cache;</pre>
+</dl>
+<p>
+in the configuration file. This is equivalent to enabling all three
+of <code>extend_cache_images</code>, <code>extend_cache_scripts</code>,
+and <code>extend_cache_css</code>.
+</p>
+<p>
+Also see: <a href="filter-cache-extend-pdfs">extend_cache_pdfs</a>.
+</p>
+
+<h2>Description</h2>
+<p>
+'Extend Cache' seeks to improve the cacheability of a web page's resources
+without compromising the ability of site owners to change the resources
+and have those changes propagate to users' browsers.
+</p>
+<p>
+This filter is based on the
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/caching#LeverageBrowserCaching">
+best practice</a> to optimize caching, as applied to the browser.
+</p>
+
+<h2 id="operation">Operation</h2>
+<p>
+The 'Extend Cache' filter rewrites the URL references in the HTML
+page to include a hash of the resource content (if
+<a href="filter-css-rewrite"><code>rewrite_css</code></a> is enabled
+then image URLs in CSS will also be rewritten). Thus if the site
+owners change the resource content, then the URL for the rewritten
+resource will also change. The old content in the user's browser
+cache will not be referenced again, because it will not match the new name.
+</p>
+<p>
+The 'Extend Cache' filter also rewrites the HTTP header to extend the
+<code>max-age</code> value of the cacheable resource to 31536000 seconds,
+which is one year.
+</p>
+<p>
+For example, for the following HTML tag/HTTP header pair:
+</p>
+<pre class="prettyprint">
+HTML tag : <img src="images/logo.gif">
+HTTP header: Cache-Control:public, max-age=300
+</pre>
+<p>
+PageSpeed will rewrite these into:
+</p>
+<pre class="prettyprint">
+HTML tag : <img src="images/logo.gif.pagespeed.ce.xo4He3_gYf.gif">
+HTTP header: Cache-Control:public, max-age=31536000
+</pre>
+<p>
+PageSpeed uses the origin cache time-to-live (TTL), in this case
+300 seconds, to periodically re-examine the content to see if it's
+changed. If it changes, then the hash of the content will also
+change. Thus it's safe to serve the hashed URL with a long
+timeout—PageSpeed uses one year.
+</p>
+<p>
+If the site owners change the logo, then PageSpeed will notice
+within 5 minutes and begin serving a different URL to users. But if
+the content does not change, then the hash will not change, and the
+copy in each user's browser will still be valid and reachable.
+</p>
+<p>
+Thus the site owners are still in complete control of how rapidly they can
+deploy changes to the site, but this does not affect the effectiveness
+of the browser cache. Decreasing the TTL only affects how often
+PageSpeed will need to re-examine the resource.
+</p>
+<p>
+It should be noted that cache extension is built into other
+PageSpeed filters as well. All filters that rewrite resources
+include a content-hash in the generated URL, and serve the resource
+with a 1-year TTL. The purpose of this filter is to extend cache
+lifetimes for all resources that are not otherwise optimized.
+</p>
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> for
+cache-extending resources
+<a href="https://www.modpagespeed.com/examples/extend_cache.html?ModPagespeed=on&ModPagespeedFilters=extend_cache">in HTML</a> and
+<a href="https://www.modpagespeed.com/examples/rewrite_css_images.html?ModPagespeed=on&ModPagespeedFilters=rewrite_css,extend_cache">in CSS</a>.
+</p>
+
+<h2 id="limitations">Limitations</h2>
+<p>
+Cache extension is only applied to resources that are publicly
+cacheable to begin with. Cache extension is not done on resources
+that have <code>Cache-Control: private</code> or <code>Cache-Control:
+nocache</code>.
+</p>
+<p>
+This can be overridden with:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedForceCaching on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ForceCaching on;</pre>
+</dl>
+<p>
+This switch is intended for experimental purposes only, to help
+evaluate the benefit of cache extension against the effort of adding
+cache-control headers to resources. Live traffic should not be served
+this way.
+</p>
+<p>
+The following configure file fragment demonstrates how to configure
+caching headers in Apache. This is how the mod_pagespeed_example
+directory is set up.
+</p>
+<pre class="prettyprint lang-sh">
+# These caching headers are set up for the mod_pagespeed example, and
+# also serve as a demonstration of good values to set for the entire
+# site, if it is to be optimized by mod_pagespeed.
+<Directory /var/www/mod_pagespeed_example>
+ # Any caching headers set on HTML are ignored, and all HTML is served
+ # uncacheable. PageSpeed rewrites HTML files each time they are served. The
+ # first time mod_pagespeed sees an HTML file, it generally won't optimize it
+ # fully. It will optimize better after the second view. Caching defeats this
+ # behavior.
+
+ # Images, styles, and JavaScript are all cache-extended for
+ # a year by rewriting URLs to include a content hash. mod_pagespeed
+ # can only do this if the resources are cacheable in the first place.
+ # The origin caching policy, set here to 10 minutes, dictates how
+ # frequently mod_pagespeed must re-read the content files and recompute
+ # the content-hash. As long as the content doesn't actually change,
+ # the content-hash will remain the same, and the resources stored
+ # in browser caches will stay relevant.
+ <FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
+ Header set Cache-control "public, max-age=600"
+ </FilesMatch>
+</Directory>
+</pre>
+<p>
+The equivalent configuration for Nginx would be:
+<pre class="prettyprint">
+# Make sure this goes after the .pagespeed. location regexp in your
+# configuration file so that .pagespeed. resources don't get this header
+# applied.
+location /mod_pagespeed_example {
+ location ~* \.(jpg|jpeg|gif|png|js|css)$ {
+ add_header Cache-Control "public, max-age=600";
+ }
+}
+</pre>
+
+<h2 id="risks">Risks</h2>
+<p>
+This filter is considered low risk. The rewritten URL will have a different name
+than that of the original URL, however, so JavaScript that uses URLs as
+templates can stop working. For example, consider a site that
+has <code><input type=image src="button.gif"></code> and runs JavaScript
+that turns <code>button.gif</code> into <code>button-hover.gif</code> when the
+user hovers over the button. With cache extension enabled, or any filter that
+changes the URLs of images, PageSpeed would replace the HTML fragment with
+something like <code><input type=image
+src="button.gif.pagespeed.ce.xo4He3_gYf.gif"></code>. If the script was
+coded as "insert '-hover' before the final '.'" then it would construct an
+invalid hover URL of <code>button.gif.pagespeed.ce.xo4He3_gYf-hover.gif</code>.
+If this is a problem on your site, consider <a href="system#ipro">In-Place
+Resource Optimization</a>.
+
+</p>
+<p>
+ When applied to JavaScript files, this filter is sensitive to
+ <a href="restricting_urls#aris"><code
+ >AvoidRenamingIntrospectiveJavascript</code></a>. For example,
+ a JavaScript file that
+ calls <code>document.getElementsByTagName('script')</code> will not be
+ cache-extended.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-canonicalize-js.html b/doc/filter-canonicalize-js.html
new file mode 100644
index 0000000..a2d4ab5
--- /dev/null
+++ b/doc/filter-canonicalize-js.html
@@ -0,0 +1,293 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Canonicalize JavaScript Libraries</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Canonicalize JavaScript Libraries</h1>
+<h2>Configuration</h2>
+<p>
+The 'Canonicalize JavaScript Libraries' filter is enabled by specifying:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters canonicalize_javascript_libraries</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed EnableFilters canonicalize_javascript_libraries;
+
+</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+This filter identifies popular JavaScript libraries that can be replaced with
+ones hosted for free by a JavaScript library hosting service — by default
+the <a href="/speed/libraries/">Google Hosted Libraries</a>. This has several
+benefits:
+<ul>
+ <li>Most important, first-time site visitors can benefit from browser caching,
+since they may have visited other sites making use of the same service to obtain
+the libraries.</li>
+ <li>The JavaScript hosting service acts as a content delivery network for the
+hosted files, reducing load on the server and improving browser load times.</li>
+ <li>There are no charges for the resulting use of bandwidth by site
+visitors.</li>
+ <li>The hosted versions of library code are generally optimized with
+third-party minification tools. These optimizations can make use of
+library-specific annotations or minification settings that aren't portable to
+arbitrary JavaScript code, so the libraries benefit from more aggressive
+optimization than can be provided by PageSpeed.</li>
+</ul>
+<p>
+In Apache the default set of libraries can be found in
+the <code><a href="https://github.com/apache/incubator-pagespeed-mod/blob/master/net/instaweb/genfiles/conf/pagespeed_libraries.conf">pagespeed_libraries.conf</a></code>
+file, which is loaded along with <code>pagespeed.conf</code> when Apache starts
+up. It contains signatures for all the <a href="/speed/libraries/">Google Hosted
+Libraries</a>. In Nginx you need to
+convert <code>pagespeed_libraries.conf</code> from Apache-format to Nginx
+format:
+</p>
+<pre class="prettyprint lang-sh">
+$ scripts/pagespeed_libraries_generator.sh > ~/pagespeed_libraries.conf
+$ sudo mv ~/pagespeed_libraries.conf /path/to/nginx/configuration_files/
+</pre>
+<p>
+You also need to include it in your Nginx configuration by reference:
+</p>
+<pre class="prettyprint lang-sh">
+include pagespeed_libraries.conf;
+</pre>
+<p>
+Don't edit <code>pagespeed_libraries.conf</code>. Local edits will keep you
+from being able to update it when you update PageSpeed. Rather than editing it
+you should add additional libraries to your main configuration file:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLibrary 43 1o978_K0_LNE5_ystNklf \
+ //www.modpagespeed.com/rewrite_javascript.js</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed Library 43 1o978_K0_LNE5_ystNklf
+ //www.modpagespeed.com/rewrite_javascript.js;</pre>
+</dl>
+<p>
+The general format of these entries is:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedLibrary bytes MD5 canonical_url</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed Library bytes MD5 canonical_url;</pre>
+</dl>
+<p>
+Here <code>bytes</code> is the size in bytes of the library <em>after</em>
+minification by PageSpeed, and <code>MD5</code> is the MD5 hash of the
+library after minification. Minification controls for differences in whitespace
+that may occur when the same script is obtained from different
+sources. The <code>canonical_url</code> is the hosting service URL used to
+replace occurrences of the script. Note that the canonical URL in the above
+example is protocol-relative; this means the data will be fetched using the same
+protocol (<code>http</code> or <code>https</code>) as the containing
+page. Because older browsers don't handle protocol-relative URLs reliably,
+PageSpeed resolves a protocol-relative library URL to an absolute URL based
+on the protocol of the containing page. Do not use <code>http</code> canonical
+URLs in configurations that may serve content over <code>https</code>, or the
+rewritten pages will expose your site to attack and trigger a mixed-content
+warning in the browser. Similarly, avoid using <code>https</code> URLs unless
+you know that the resulting library will eventually be fetched from a secure
+page, as SSL negotiation adds overhead to the initial request.
+</p>
+<p>
+Additional library configuration metadata can be generated with the help of
+the <code>pagespeed_js_minify</code> utility installed along with PageSpeed.
+To use this utility, you will need a local copy of the JavaScript code that you
+wish to replace. If this is stored in <code>library.js</code>, you can generate
+<code>bytes</code> and <code>MD5</code> as follows:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >$ pagespeed_js_minify --print_size_and_hash library.js</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >$ cd /path/to/psol/lib/Release/linux/ia32/
+ $ pagespeed_js_minify --print_size_and_hash library.js</pre>
+</dl>
+<p>
+If you're using the <a href="filter-js-minify#new-minifier">new
+javascript minifier</a>, add the <code>--use_experimental_minifier</code>
+argument to <code>pagespeed_js_minify</code>. If you're using the old minifier,
+add <code>--nouse_experimental_minifier</code>. (As of 1.10.33.0,
+<code>--use_experimental_minifier</code> is default. Previously,
+<code>--nouse_experimental_minifier</code> was.)
+The default <code>pagespeed_libraries.conf</code> includes hashes for both
+the old and new minifiers.
+</p>
+<p>
+This filter is based on the best practices of
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/caching#LeverageBrowserCaching">
+optimizing browser caching</a>
+and <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload#MinifyJS">reducing payload
+size</a>.
+</p>
+
+<h2>Operation</h2>
+<p>
+In order to identify a library and canonicalize its URL, PageSpeed must of
+course be able to fetch the JavaScript code from the URL on the original page.
+Because library canonicalization identifies libraries solely by their size and
+hash signature, it is not necessary to authorize PageSpeed to fetch content
+from the domain hosting the canonical content itself. This means that it is
+safe to use this filter behind a reverse proxy or in other situations where
+network access by PageSpeed is deliberately restricted. Browsers visiting
+the site will fetch the content from the canonical URL, but PageSpeed itself
+does not need to do so.
+</p>
+
+<h3>Examples</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/canonicalize_javascript_libraries.html?ModPagespeed=on&ModPagespeedFilters=canonicalize_javascript_libraries">example</a>.
+</p>
+<p>
+If the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script src="jquery_1_8.js">
+ </script>
+ <script src="a.js">
+ </script>
+ <script src="b.js">
+ </script>
+ </head>
+ <body>
+ ...
+ </body>
+</html>
+</pre>
+<p>
+Then, assuming <code>jquery_1_8.js</code> was an unminified copy of the jquery
+library and <code>a.js</code> and <code>b.js</code> contained site-specific code
+that made use of jquery, the page would be rewritten as follows:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
+ </script>
+ <script src="a.js">
+ </script>
+ <script src="b.js">
+ </script>
+ </head>
+ <body>
+ ...
+ </body>
+</html>
+</pre>
+<p>
+The library URL has been replaced by a reference to the canonical minified
+version hosted on <code>ajax.googleapis.com</code>. Note that canonical
+libraries do not participate in most other JavaScript optimizations. For
+example, if <a href="filter-js-combine">Combine JavaScript</a> is also enabled,
+the above page will be rewritten as follows:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
+ </script>
+ <script src="http://www.example.com/a.js+b.js.pagespeed.jc.zYiUaxFS8I.js">
+ </script>
+ </head>
+ <body>
+ ...
+ </body>
+</html>
+</pre>
+<p>
+The canonical library is <em>not</em> combined with the other two JavaScript
+files, since this would lose the bandwidth and caching benefits of fetching it
+from the canonical URL.
+</p>
+<p>
+If <a href="filter-js-defer">defer_javascript</a> is enabled, <em>and</em> library
+is <em>not</em> tagged with <code>data-pagespeed-no-defer</code>,
+the canonicalized library is deferred.
+</p>
+
+<h2>Requirements</h2>
+<p>
+Only complete, unmodified libraries referenced by <code><script></code>
+tags in the HTML will be rewritten. Libraries that are loaded by other means
+(for example by injecting a loader script) or that have been modified will not
+be canonicalized.
+</p>
+
+<h2>Risks</h2>
+<p>
+You must ensure that you abide by the terms of service of the providers of the
+canonical content before enabling canonicalization. The terms of service for the
+default configuration can be found
+at <a href="/speed/libraries/terms">https://developers.google.com/speed/libraries/terms</a>.
+</p>
+<p>
+The canonical URL refers to a third-party domain; this can cause additional DNS
+lookup latency the first time a library is loaded. This is mitigated by the
+fact that the canonical copy of the data is shared among multiple sites.
+</p>
+<p>
+The initial request for a canonical URL will contain a <code>Referer:</code>
+header with the URL of the referring page. This permits the host of the
+canonical content to see a subset of traffic to your site (the first load of a
+page on your site that contains an identified library by a browser that does not
+already have that library in its cache). The provider should describe how this
+data is used in its terms of service. The terms of service for the default
+configuration can be found at
+<a href="/speed/libraries/terms">https://developers.google.com/speed/libraries/terms</a>.
+Again, this risk is mitigated by the fact that canonical libraries are shared
+among multiple sites; a popular library is likely to already reside in the
+browser cache.
+</p>
+<p>
+Sites serving content on both <code>http</code> and <code>https</code> URLs must
+use protocol-relative canonical URLs as shown <a href="#sample">above</a>.
+Fetching a library insecurely from a secure page exposes a site to attack.
+Fetching a library securely from an ordinary page can increase load time due to
+SSL overheads.
+</p>
+<p>
+It is theoretically possible to craft a JavaScript file whose minified size and
+hash exactly match that of a canonical library, but whose code behaves
+differently. In such a case the library will be replaced with the canonical
+(widely-used) library. This will break the page that contains the reference to
+the crafted JavaScript.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-comment-remove.html b/doc/filter-comment-remove.html
new file mode 100644
index 0000000..8874590
--- /dev/null
+++ b/doc/filter-comment-remove.html
@@ -0,0 +1,129 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Remove Comments</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Remove Comments</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Remove Comments' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters remove_comments</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters remove_comments;</pre>
+</dl>
+<p>
+in the configuration file. To retain comments that have semantic reason to be
+delivered to the browser, you may specify one more wildcard patterns
+using <code>RetainComment</code> directives. For example:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRetainComment " google_ad_section*"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RetainComment " google_ad_section*";</pre>
+</dl>
+</p>
+
+<h2>Description</h2>
+<p>
+The <code>remove_comments</code> filter eliminates HTML comments,
+which are often used to document the code or to comment out
+experiments. Note that this directive applies only to HTML files.
+CSS comments are eliminated with the
+<code>rewrite_css</code> filter, and Javascript comments are
+eliminated with the <code>rewrite_javascript</code> filter.
+</p>
+<p>
+The filter reduces the transfer size of HTML files by removing most HTML
+comments. Depending on the HTML file, this filter can significantly reduce the
+number of bytes transmitted on the network. Also note that
+the <code>RetainComment</code> directive currently only applies to HTML files --
+the wildcard pattern is not currently used for retaining CSS or Javascript
+comments.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+<body>
+<!-- Display the site logo here -->
+<img src="logo.png">
+<!-- Now show the page contents -->
+<div>Some content here</div>
+<!-- Apply IE-specific CSS -->
+<!-- [if IE ]>
+<link href="iecss.css" rel="stylesheet" type="text/css">
+<![endif]-->
+<!-- google_ad_section_end -- retained due to RetainComment directive -->
+</body>
+</html>
+</pre>
+<p>
+Then PageSpeed, with the above directives specified, will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+<body>
+<img src="logo.png">
+<div>Some content here</div>
+<!-- [if IE ]>
+<link href="iecss.css" rel="stylesheet" type="text/css">
+<![endif]-->
+<!-- google_ad_section_end -- retained due to RetainComment directive -->
+</body>
+</html>
+</pre>
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/remove_comments.html?ModPagespeed=on&ModPagespeedFilters=remove_comments">example</a>.
+</p>
+
+<h2>Notes</h2>
+<p>
+The "Remove Comments" filter is aware of
+<a href="http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx">Internet Explorer conditional comments</a> and does not remove them.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is low risk for most web pages. Some web pages use comments to
+embed data or JavaScript, in order to reduce the parse time of the HTML
+document. Such pages sould disable this filter, as it will remove the
+comments containing the data or JavaScript that is needed by these web
+pages.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-convert-meta-tags.html b/doc/filter-convert-meta-tags.html
new file mode 100644
index 0000000..dd29075
--- /dev/null
+++ b/doc/filter-convert-meta-tags.html
@@ -0,0 +1,78 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Convert Meta Tags</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Convert Meta Tags</h1>
+<h2>Configuration</h2>
+<p>
+The 'Convert Meta Tags' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_meta_tags</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_meta_tags;</pre>
+</dl>
+<p>
+in the configuration file, but it is also enabled automatically by the core
+filter set.
+</p>
+
+<h2>Description</h2>
+<p>
+The 'Convert Meta Tags' filter adds a response header that matches each meta
+tag with an http-equiv attribute. For example, HTML
+<pre class="prettyprint"
+ ><meta http-eqiv="Content-Type" content="text/html; charset=UTF-8"></pre>
+would add an HTTP header:
+<pre class="prettyprint"
+ >Content-Type: text/html; charset=UTF-8</pre>
+in the response headers.
+</p>
+<p>
+The original tag is left unchanged.
+</p>
+<p>
+Certain http-equiv meta tags, specifically those that specify content-type,
+require a browser to reparse the html document if they do not match the headers.
+By ensuring that the headers match the meta tags, these reparsing delays are
+avoided.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered minimal risk because at this time,
+Content-Type is the only <code>http-equiv</code> value that is transformed into
+an HTTP header. Other http-equiv values have been found to have unexpected semantic
+implications when transformed to HTTP.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-above-scripts.html b/doc/filter-css-above-scripts.html
new file mode 100644
index 0000000..b4d2e23
--- /dev/null
+++ b/doc/filter-css-above-scripts.html
@@ -0,0 +1,152 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Move CSS Above Scripts</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Move CSS Above Scripts</h1>
+
+
+<h2>Configuration</h2>
+<p>
+ The 'Move CSS Above Scripts' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters move_css_above_scripts</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters move_css_above_scripts;</pre>
+</dl>
+<p>
+ in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+ 'Move CSS Above Scripts' seeks to make sure scripts do not block the
+ loading of CSS resources.
+</p>
+<p>
+ This is based on the
+ <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts">
+ best practice for downloading resources early.
+ </a>
+</p>
+
+<h2>Operation</h2>
+<p>
+ The 'Move CSS Above Scripts' filter operates only on CSS
+ <code><link></code> and <code><style></code> tags found after the
+ first <code><script></code> tag and moves these tags above the first
+ <code><script></code>.
+</p>
+<p>
+ For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <script src="script.js" type="text/javascript"></script>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ <style type="text/css">
+ .foo { color: red; }
+ </style>
+ <link rel="stylesheet" type="text/css" href="styles/all_styles.css">
+ </body>
+</html>
+</pre>
+<p>
+ Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <style type="text/css">
+ .foo { color: red; }
+ </style>
+ <link rel="stylesheet" type="text/css" href="styles/all_styles.css">
+ <script src="script.js" type="text/javascript"></script>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+
+<p>
+ In some browsers the original version will not even download the CSS file
+ until the JavaScript has been downloaded and run. This transformation will
+ make sure the CSS file is loaded first.
+</p>
+<p class="note">
+ Note: You may also want to enable
+ the <a href="filter-css-to-head">move_css_to_head</a> filter to avoid a flash
+ of unstyled content. When both filters are enabled, stylesheets are moved
+ into the head and above the first script.
+</p>
+
+<h3>Example</h3>
+<p>
+ You can see the filter in action at <code>www.modpagespeed.com</code> on this
+ <a href="https://www.modpagespeed.com/examples/move_css_above_scripts.html?ModPagespeed=on&ModPagespeedFilters=move_css_above_scripts">example</a>.
+</p>
+
+<h2>Limitations</h2>
+<p>
+ This filter operates within the scope of a "flush window". Specifically,
+ large, or dynamically generated HTML files may be "flushed" by the
+ resource generator before they are complete. If the filter
+ encounters a flush after the first <code><script></code> tag,
+ subsequently encountered CSS elements will not be moved above it.
+</p>
+
+<h2>Risks</h2>
+<p>
+ This filter is considered low risk. However, JavaScript that is
+ executed before a CSS element will see a different view of the DOM in
+ the presence of this rewriter: the CSS element will now be in the head.
+ If there is such JavaScript embedded in the middle of a page then this
+ rewriter may change its behavior.
+</p>
+<p>
+ This filter may slow down your webpages for some browsers. Just as JavaScript
+ can block download of CSS in some browsers, some others will not execute
+ JavaScript until preceding CSS has been rendered. This filter is currently
+ considered experimental while we measure its effectiveness.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-combine.html b/doc/filter-css-combine.html
new file mode 100644
index 0000000..5992826
--- /dev/null
+++ b/doc/filter-css-combine.html
@@ -0,0 +1,216 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Combine CSS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Combine CSS</h1>
+
+
+<h2>Configuration</h2>
+<p>
+The 'Combine CSS' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters combine_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters combine_css;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+'Combine CSS' seeks to reduce the number of HTTP requests made by a browser
+during page refresh by replacing multiple distinct CSS files with a single CSS
+file, containing the contents of all of them. This is particularly important in
+old browsers, that were limited to two connections per domain. In addition to
+reduced overhead for HTTP headers and communications warm-up, this approach
+works better with TCP/IP slow-start, increasing the effective payload bit-rate
+through the browser's network connection.
+</p>
+<p>
+This <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt#CombineExternalCSS">practice</a>
+reduces the number of round-trip times.
+</p>
+
+<h2>Operation</h2>
+<p>
+The "CSS Combine" filter finds all CSS <code><link></code> tags. If there
+was more than one in a flush window, it removes each of those links and replaces
+them with a single <code><link></code> to the merged document, which it
+places wherever the first CSS <code><link></code> originally was.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="styles/yellow.css">
+ <link rel="stylesheet" type="text/css" href="styles/blue.css">
+ <link rel="stylesheet" type="text/css" href="styles/big.css">
+ <link rel="stylesheet" type="text/css" href="styles/bold.css">
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="styles/yellow.css+blue.css+big.css+bold.css.pagespeed.cc.xo4He3_gYf.css">
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/combine_css.html?ModPagespeed=on&ModPagespeedFilters=combine_css">example</a>.
+</p>
+
+<h2>Parameters that affect CSS optimization</h2>
+
+<h3 id="MaxCombinedCssBytes">MaxCombinedCssBytes</h3>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxCombinedCssBytes MaxBytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxCombinedCssBytes MaxBytes;</pre>
+</dl>
+<p>
+<code>MaxBytes</code> is the maximum size in bytes of the combined CSS files.
+CSS files larger than <code>MaxBytes</code> will be kept intact;
+other CSS files will be combined into one or more files, each being no more
+than <code>MaxBytes</code> in size. The current default value for
+<code>MaxBytes</code> is -1 (unlimited).
+</p>
+
+<h2>Limitations</h2>
+<p>The CSS Combine filter operates within the scope of a "flush window".
+Specifically, large, or dynamically generated HTML files may be
+"flushed" by the resource generator before they are complete. When the
+CSS combiner encounters a flush, it will emit all CSS combinations seen
+up to the point of the flush. After the flush, it will begin collecting
+a new CSS combination.
+</p>
+<p>This filter generates URLs that are essentially the concatenation
+of the URLs of all the CSS files being combined. The maximum URL size
+is generally limited to about 2k characters due to IE:
+See <a href="http://support.microsoft.com/kb/208427/EN-US"
+>http://support.microsoft.com/kb/208427/EN-US</a>. Apache servers by
+default impose a further limitation of about 250 characters per URL segment
+(text between slashes). PageSpeed circumvents this limitation when it runs
+within Apache, but if you employ proxy servers in your path you may need to
+re-impose it by overriding the setting here. The default setting is 1024.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxSegmentLength 250</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxSegmentLength 250;</pre>
+</dl>
+
+<h3 id="permit-ids-for-css-combining">Combining Resources with IDs</h3>
+<p class="note"><strong>Note: New feature as of 1.12.34.1</strong></p>
+
+<p>
+ By default PageSpeed won't combine CSS files that have <code>id</code>
+ attributes, because this often indicates that the site designer intended to
+ reference them in javascript. However, some content management systems,
+ including WordPress, put <code>id</code>s on all stylesheets for clarity. To
+ enable combining these files, you can provide one or more wildcards. For
+ example, this would mark stylesheets with ids starting with <code>font</code>
+ as eligible for combining:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedPermitIdsForCssCombining font*</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed PermitIdsForCssCombining font*;</pre>
+</dl>
+
+<h2>Requirements</h2>
+<p>
+The 'Combine CSS' filter may need to <em>absolutify</em> relative
+URLs, if rewriting the CSS causes the path to be moved. The filter
+will not merge together resources from multiple distinct domains, even
+if those domains are each authorized by <code>Domain</code>.
+It <strong>will</strong> merge together resources from multiple
+distinct domains that have been mapped together via
+<code>MapRewriteDomain</code>.
+</p>
+<p>
+By default, the filter will combine together CSS files from different
+paths, placing the combined element at the lowest level common to both
+origins. In some cases, this may be undesirable. You can turn off the
+behavior with:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCombineAcrossPaths off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CombineAcrossPaths off;</pre>
+</dl>
+<p>
+The filter will maintain the order of the CSS contents, as class order can be
+significant.
+</p>
+<p>
+IE Directives containing CSS links form a "barrier" for the CSS combiner.
+Multiple CSS elements found before an IE directive are combined together
+immediately before the IE directive. Multiple CSS elements found after are
+also combined, but the combination does not span across the IE directive, as
+that would affect the order that the browser sees the CSS elements.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered low risk. However, JavaScript can be written that
+walks the DOM looking for <code><link></code> entries with certain
+syntax. Such JavaScript may behave differently on a page which has modified
+CSS links in this way.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-inline-google-fonts.html b/doc/filter-css-inline-google-fonts.html
new file mode 100644
index 0000000..b4aeff0
--- /dev/null
+++ b/doc/filter-css-inline-google-fonts.html
@@ -0,0 +1,162 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Inline Google Fonts API CSS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Inline Google Fonts API CSS</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Inline Google Fonts API CSS' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters inline_google_font_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters inline_google_font_css;</pre>
+</dl>
+<p>
+in the configuration file. You also need to
+enable <a href="https_support#https_fetch">HTTPS Fetching</a> if your pages load
+fonts over HTTPS:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedFetchHttps enable</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed FetchHttps enable;</pre>
+</dl>
+
+</p>
+
+<p>As of 1.9.32.6, the size limit for this filter is controlled as follows:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedGoogleFontCssInlineMaxBytes bytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed GoogleFontCssInlineMaxBytes bytes;</pre>
+</dl>
+
+<p>In older versions, the filter used same size limits as the main CSS filter:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCssInlineMaxBytes bytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CssInlineMaxBytes bytes;</pre>
+</dl>
+<p>
+This is the maximum size in bytes of any CSS file that will be inlined.
+</p>
+<h2>Description</h2>
+<p>
+The "Inline Google Fonts API CSS" filter reduces the number of requests made by
+a web page that uses the Google Fonts API by inlining the small loader CSS
+into the webpage. Note that because the loader CSS is browser-specific, this
+feature is not currently compatible with downstream caching being on or
+<code>ModifyCachingHeaders</code> being off.
+</p>
+<h2>Operation</h2>
+<p>
+When the 'Inline Google Fonts API CSS' filter is enabled, the contents of the
+small external CSS resources produced to load the fonts are written directly
+into the HTML document; the browser does not need to request those CSS
+resources independently.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <title>inline_google_font_css example</title>
+ <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto">
+ <style>
+ body {
+ font-family: 'Roboto', sans-serif;
+ }
+ </style>
+ </head>
+ <body>
+ The font should be slightly more robotic.
+ </body>
+</html>
+</pre>
+<p>
+Then, a visitor using a browser for which woff fonts are preferred may see
+something like:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <title>inline_google_font_css example</title>
+ <style>@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Roboto Regular'), local('Roboto-Regular'), url(http://themes.googleusercontent.com/static/fonts/roboto/v9/abcd.woff) format('woff');
+ }
+ </style>
+ <style>
+ body {
+ font-family: 'Roboto', sans-serif;
+ }
+ </style>
+ </head>
+ <body>
+ The font should be slightly more robotic.
+ </body>
+</html>
+</pre>
+<p>
+This eliminates the browser request to <code>fonts.googleapis.com</code> and
+potentially the need for the browser to perform a DNS lookup and connect to
+that host entirely.
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/inline_google_font_css.html?PageSpeed=on&PageSpeedFilters=inline_google_font_css">example</a>.
+</p>
+
+<h2>Risks</h2>
+<p>
+You must ensure that you abide by
+<a href="https://developers.google.com/fonts/terms">Google Fonts API Terms of Service</a>.
+Note that enabling this filter will cause some requests to be sent to
+the API from your server (rather than just the visitor), which may be logged
+per the Fonts API Terms of Service.
+</p>
+
+<p>
+The filter is low to moderate risk. It should be safe for most pages, but it
+could potentially break scripts that walk the DOM looking
+for and examining <code><link></code> or <code><style></code> tags.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-inline-import.html b/doc/filter-css-inline-import.html
new file mode 100644
index 0000000..8eab835
--- /dev/null
+++ b/doc/filter-css-inline-import.html
@@ -0,0 +1,112 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Inline @import to Link</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Inline @import to Link</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Inline @import to Link' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters inline_import_to_link</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters inline_import_to_link;</pre>
+</dl>
+in the configuration file.
+</p>
+<h2>Description</h2>
+<p>
+The "Inline @import to Link" filter converts a <code><style></code> tag
+consisting of only <code>@import</code> statements into the corresponding
+<code><link></code> tags. This conversion does not itself result in any
+significant optimization, rather its value lies in that it enables optimization
+of the linked-to CSS files by later filters, in particular the combine_css,
+rewrite_css, inline_css, and extend_cache filters.
+</p>
+<h2>Operation</h2>
+<p>
+This filter inspects the contents of all <code><style></code> tags and
+converts the tag if all the following conditions are met:</p>
+<ul>
+<li>Either the <code><style></code> tag has no <code>type</code>
+ attribute or the <code>type</code> attribute has the value
+ "text/css".</li>
+<li>The contents comprise one or more valid <code>@import</code> statements,
+ and no other statements.</li>
+<li>None of the imported URLs are empty.</li>
+<li>The <code><style></code> tag has neither an <code>href</code> nor a
+ <code>rel</code> attribute (which would make it invalid anyway).</li>
+<li>If the <code><style></code> tag has a <code>media</code> attribute
+ and the <code>@import</code> statement specifies media after the URL, then
+ the media types listed must be the same. They do not have to be in the same
+ order, and blank media types are ignored.</li>
+</ul>
+<p>
+If all these conditions are met, the <code><style></code> tag and its
+contents are replaced with a <code><link></code> tag for each
+<code>@import</code>, with:</p>
+<ul>
+<li>Attributes from the <code><style></code> tag copied to the
+ <code><link></code> tag.</li>
+<li>An <code>href</code> attribute with value of the imported URL.</li>
+<li>A <code>rel</code> attribute with value of "stylesheet".</li>
+<li>If the <code><style></code> tag did not have a <code>media</code>
+ attribute but the <code>@import</code> specified media after the URL, then
+ a <code>media</code> attribute with value of the media specified after the
+ URL.</li>
+</ul>
+<p>
+For example, if the <code><style></code> tag looks like this:
+</p>
+<pre class="prettyprint">
+<style type="text/css" media="screen">@import url(http://www.example.com/style.css);</style>
+</pre>
+<p>
+Then PageSpeed will convert it to:
+<pre class="prettyprint">
+<link type="text/css" media="screen" rel="stylesheet" href="http://www.example.com/style.css"/>
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/inline_import_to_link.html?ModPagespeed=on&ModPagespeedFilters=inline_import_to_link">example</a>.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered minimal risk.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-inline.html b/doc/filter-css-inline.html
new file mode 100644
index 0000000..604dcf5
--- /dev/null
+++ b/doc/filter-css-inline.html
@@ -0,0 +1,157 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Inline CSS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Inline CSS</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Inline CSS' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters inline_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters inline_css;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+<p>When this filter is enabled, you may also enable the following setting:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCssInlineMaxBytes bytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CssInlineMaxBytes bytes;</pre>
+</dl>
+<p>
+This is the maximum size in bytes of any CSS file that will be inlined.
+</p>
+<h2>Description</h2>
+<p>
+The "Inline CSS" filter reduces the number of requests made by a web page by
+inserting the contents of small external CSS resources directly into the HTML
+document. This can reduce the time it takes to display content to the user,
+especially in older browsers.
+</p>
+<h2>Operation</h2>
+<p>
+When the 'Inline CSS' filter is enabled, The contents of small external CSS
+resources are written directly into the HTML document; therefore the browser
+does not request those CSS resources independently.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" href="small.css">
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+And the resource <code>small.css</code> is like this:
+<pre class="prettyprint">
+ .yellow {background-color: yellow;}
+ .blue {color: blue;}
+ .big { font-size: 8em; }
+ .bold { font-weight: bold; }
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <style>
+ .yellow {background-color: yellow;}
+ .blue {color: blue;}
+ .big { font-size: 8em; }
+ .bold { font-weight: bold; }
+ </style>
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+This eliminates the browser request to <code>small.css</code> by placing its
+contents inline in the HTML document.
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/inline_css.html?ModPagespeed=on&ModPagespeedFilters=inline_css">example</a>.
+</p>
+
+<h2>Note</h2>
+<p>
+CSS may contain URLs that are relative to the location of the CSS
+file. To avoid breaking such URLs, the 'Inline CSS' filter will attempt to
+rewrite them into absolute URLs when it performs the inlining.
+</p>
+
+<h2>Requirements</h2>
+<p>
+There is a tradeoff here between requests and cacheability: including the CSS
+directly in the HTML avoids making an additional request to the external CSS
+resource, but if the CSS file is large (and doesn't change often), it may be
+better to keep it separate from the HTML so that it can be cached by the
+browser. Thus, the Inline CSS filter will only inline CSS files below a
+certain size threshold, which can be adjusted using the
+<code>CssInlineMaxBytes</code> directive.
+</p>
+<p>
+It is possible for CSS files to contain small snippets of JavaScript code, at
+least for certain browsers. To avoid opening up cross-domain scripting
+vulnerabilities, the Inline CSS filter will only inline an external CSS file if
+it is being served from the same domain as the HTML file into which it is to be
+inlined.
+</p>
+
+<h2>Risks</h2>
+<p>
+The 'Inline CSS' filter is low to moderate risk. It should be safe for most
+pages, but it could potentially break scripts that walk the DOM looking for
+and examining <code><link></code> or <code><style></code> tags.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-outline.html b/doc/filter-css-outline.html
new file mode 100644
index 0000000..295ef4c
--- /dev/null
+++ b/doc/filter-css-outline.html
@@ -0,0 +1,182 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Outline CSS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Outline CSS</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Outline CSS' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters outline_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters outline_css;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+This filter is an <strong>experimental</strong> filter which takes inline
+CSS and puts it in an external resource.
+</p>
+
+<h2>Operation</h2>
+<p>
+The 'Outline CSS' filter outlines all CSS that is larger than a minimum byte
+threshold. The threshold can be set by adding/changing the line:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCssOutlineMinBytes 3000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CssOutlineMinBytes 3000;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <style type="text/css">
+ .yellow {background-color: yellow;}
+ .blue {color: blue;}
+ .big { font-size: 8em; }
+ .bold { font-weight: bold; }
+ ...
+ </style>
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="of.HASH.css">
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+And a new CSS file (<code>of.HASH.css</code>) will be:
+</p>
+<pre class="prettyprint">
+ .yellow {background-color: yellow;}
+ .blue {color: blue;}
+ .big { font-size: 8em; }
+ .bold { font-weight: bold; }
+ ...
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/outline_css.html?ModPagespeed=on&ModPagespeedFilters=outline_css">example</a>.
+</p>
+
+<h2>Pros and Cons</h2>
+<p>
+This could be advantageous if:
+</p>
+<ol>
+ <li>The CSS does not change much but the HTML does, then we can cache the
+ CSS.</li>
+ <li>One has many websites with the same inlined CSS, it will be outlined
+ to a consistent name and thus will be cached more or</li>
+ <li>The inline CSS is very long, in which case, outlining it will cause it
+ to be loaded in parallel with the HTML doc.</li>
+</ol>
+<p>
+However, for some websites it will be dis-advantageous because it will:
+</p>
+<ol>
+ <li>Create an extra HTTP request.</li>
+ <li>Tie up one of the connections this domain, which could have been used to
+ fetch the actually cacheable external resources.</li>
+</ol>
+
+<h2>Requirements</h2>
+<p>
+Outline filters can currently only run on single-server environments
+because the resource can only be fetched from a server after that server
+has rewritten the HTML page. If a different server rewrote the HTML page,
+then this sever will not have the information needed to create the resource.
+This could be by a network database shared between servers.
+</p>
+<p>
+The Outline CSS filter may need to <em>"absolutify"</em> relative URLs, if
+it is outlined to a different directory than the original HTML.
+</p>
+<p>
+The Outline CSS filter will maintain the order of the CSS contents, as
+class order can be significant.
+</p>
+
+<h2>Risks</h2>
+<p>
+The 'Outline CSS' filter is considered low risk. However, JavaScript can be
+written that walks the DOM looking for <code><link></code> or
+<code><style></code> tags with certain syntax. Such JavaScript
+may behave differently on a page which has added
+<code><link></code> or removed <code><style></code> tags
+in this way.
+</p>
+<p>
+Additionally we have reproduced an obscure difference that sometimes occurs
+on WebKit-based browsers (such as Safari, Chrome and the Android browser).
+As of January 2011, WebKit does not delay JavaScript evaluation for
+external CSS loading (See
+<a href="https://webkit.org/b/24898">https://webkit.org/b/24898</a>).
+So some CSS attributes, when outlined, can cause slightly different
+rendering depending on whether or not the CSS file is loaded before or
+after the JavaScript is executed.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-rewrite.html b/doc/filter-css-rewrite.html
new file mode 100644
index 0000000..366fe28
--- /dev/null
+++ b/doc/filter-css-rewrite.html
@@ -0,0 +1,215 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Rewrite CSS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Rewrite CSS</h1>
+
+<h2 id="configuration">Configuration</h2>
+<p>
+ The 'Rewrite CSS' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_css;</pre>
+</dl>
+<p>
+ in the configuration file. To enable fallback rewriting on CSS we cannot
+ parse, also specify:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters fallback_rewrite_css_urls</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters fallback_rewrite_css_urls;</pre>
+</dl>
+
+<h2>Description</h2>
+<p>
+ This filter parses linked and inline CSS, rewrites the images found
+ and minifies the CSS. The filter works on CSS found in
+ <code><style></code> blocks and <code><link></code> refs.
+</p>
+<p>
+ Many images are referenced from CSS rather than HTML. If
+ <a href="reference-image-optimize#rewrite_images"
+ ><code>rewrite_images</code></a>,
+ <a href="reference-image-optimize#recompress_images"
+ ><code>recompress_images</code></a>,
+ <a href="reference-image-optimize#recompress_jpeg"
+ ><code>recompress_jpeg</code></a>,
+ <a href="reference-image-optimize#recompress_png"
+ ><code>recompress_png</code></a>,
+ <a href="reference-image-optimize#recompress_webp"
+ ><code>recompress_webp</code></a>,
+ <a href="reference-image-optimize#convert_gif_to_png"
+ ><code>convert_gif_to_png</code></a>,
+ <a href="reference-image-optimize#convert_jpeg_to_webp"
+ ><code>convert_jpeg_to_webp</code></a>,
+ <a href="reference-image-optimize#convert_png_to_jpeg"
+ ><code>convert_png_to_jpeg</code></a>,
+ or <a href="filter-cache-extend"
+ ><code>extend_cache</code></a>
+ are enabled this filter finds and rewrites those images, saving bytes
+ and extending cache lifetimes.
+</p>
+<p>
+ The CSS parser cannot parse some CSS3 or proprietary CSS extensions.
+ If <code>fallback_rewrite_css_urls</code> is not enabled, these
+ CSS files will not be rewritten at all.
+ If the <code>fallback_rewrite_css_urls</code> filter is enabled, a
+ fallback method will attempt to rewrite the URLs in the CSS file,
+ even if the CSS cannot be successfully parsed and minified.
+</p>
+<p>
+ Minification can drastically reduce the byte count in common CSS by
+ stripping all comments and most whitespace and shortening color names.
+ This filter can be used to avoid the extra step of minifying CSS by hand
+ when constructing and maintaining a site.
+ This <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload#MinifyCSS">practice</a>
+ reduces the payload size.
+</p>
+
+<h2>Example</h2>
+<p>
+ For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <style>
+ body { background-image: url("foo.png"); }
+ /* This comment will be stripped */
+ #iddy, .anotherId {
+ border: solid 1px #cccccc;
+ padding: 1.2em;
+ float: left;
+ color:##ff0000;
+ }
+ </style>
+ <link rel="stylesheet" type="text/css" href="extStyle.css">
+ </head>
+ <body>
+ Wow, <div class="classy" id="iddy">
+ CSS is <span>stylin'</span>.</div>
+ </body>
+</html>
+</pre>
+<p>
+ With the following in <code>extStyle.css</code>:
+</p>
+<pre class="prettyprint">
+ div.classy span, div.classy img {
+ display: block;
+ border: none !important;
+ background: none !important;
+ }
+</pre>
+<p>
+ Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <style>body{background-image:url(xfoo.png.pagespeed.ic.HASH.png}#iddy,#anotherId{border:solid 1px #ccc;padding:1.2em;float:left;color:red}</style>
+ <link rel="stylesheet" type="text/css" href="I.extStyle.css.pagespeed.cf.HASH.css">
+ </head>
+ <body>
+ Wow, <div class="classy" id="iddy">
+ CSS is <span>stylin'</span>.</div>
+ </body>
+</html>
+</pre>
+<p>
+ And the rewritten file <code>I.extStyle.css.pagespeed.cf.HASH.css</code> will
+ contain:
+</p>
+<pre class="prettyprint">
+ dif.classy span,div.classy img{display:block;border:none!important;background:none!important}
+</pre>
+
+<h3>Online Example</h3>
+<p>
+ You can see the filter in action at <code>www.modpagespeed.com</code> for
+ <a href="https://www.modpagespeed.com/examples/rewrite_css.html?ModPagespeed=on&ModPagespeedFilters=rewrite_css">CSS minification</a>,
+ <a href="https://www.modpagespeed.com/examples/rewrite_css_images.html?ModPagespeed=on&ModPagespeedFilters=rewrite_css,extend_cache">cache-extending images in CSS</a>,
+ <a href="https://www.modpagespeed.com/examples/rewrite_css_images.html?ModPagespeed=on&ModPagespeedFilters=rewrite_css,rewrite_images">rewriting images in CSS</a> and
+ <a href="https://www.modpagespeed.com/examples/fallback_rewrite_css_urls.html?ModPagespeed=on&ModPagespeedFilters=fallback_rewrite_css_urls,rewrite_css,rewrite_images">fallback rewriting of images in CSS</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+ Only CSS referenced by <code><style></code> and <code><link>
+ </code> tags is rewritten. For example, style attributes of HTML elements
+ are not rewritten. Enable <a href="filter-rewrite-style-attributes">
+ <code>rewrite_style_attributes</code></a> to rewrite these as well.
+</p>
+<p>
+ Not all CSS3 or proprietary constructs are parsed. When unhandled syntax
+ is present and the file cannot be parsed completely, the URLs in the CSS
+ can still be rewritten by the <code>fallback_rewrite_css_urls</code> filter.
+ However the CSS will not be minified.
+</p>
+
+<h2 id="risks">Risks</h2>
+<p>
+ CSS minification is considered moderate risk.
+</p>
+<p>
+ Specifically, there is an outstanding bug that the CSS parser can silently
+ lose data on malformed CSS. This only applies to malformed CSS or CSS that
+ uses proprietary extensions. All known examples have been fixed, but there
+ may be more examples not discovered yet. Without this the risk would be low.
+</p>
+<p>
+ Some JavaScript code depends upon the exact URLs of resources. When we minify
+ CSS we will change the leaf name of the file (although leave it in the same
+ directory). This could break such JavaScript.
+</p>
+
+<h2>Troubleshooting</h2>
+<p>
+ To troubleshoot why CSS is not minified, you can use the standalone binary
+ <code>css_minify_main</code>. It's shipped with mod_pagespeed, so
+ <a href="build_mod_pagespeed_from_source#debug-css"
+ >build it from source</a> and then run:
+</p>
+<pre>
+ ./out/Release/css_minify_main FILENAME.css > REWRITTEN.css
+</pre>
+<p>
+ The rewritten version is piped to <code>stdout</code> and the errors
+ encountered are piped to <code>stderr</code>. These error messages should
+ be helpful in figuring out what aspects of the CSS file could not be parsed.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-css-to-head.html b/doc/filter-css-to-head.html
new file mode 100644
index 0000000..07a34a2
--- /dev/null
+++ b/doc/filter-css-to-head.html
@@ -0,0 +1,143 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Move CSS to Head</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Move CSS to Head</h1>
+
+
+<h2>Configuration</h2>
+<p>
+ The 'Move CSS to head' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters move_css_to_head</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters move_css_to_head;</pre>
+</dl>
+<p>
+ in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+ 'Move CSS to head' seeks to reduce the number of times the browser must
+ re-flow the document by ensuring that the CSS styles are all parsed in
+ the head, before any body elements are introduced.
+</p>
+<p>
+ This is based on the
+ <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rendering#PutCSSInHead">
+ best practice for optimizing browser rendering.
+ </a>
+</p>
+
+<h2>Operation</h2>
+<p>
+ The 'Move CSS to head' filter operates only on CSS
+ <code><link</code> and <code><style></code> tags found after the
+ <code></head></code> and moves these links back into the
+ <code><head></code> ... <code></head></code> section.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <script src="script.js" type="text/javascript"></script>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ <style type="text/css">
+ .foo { color: red; }
+ </style>
+ <link rel="stylesheet" type="text/css" href="styles/all_styles.css">
+ </body>
+</html>
+</pre>
+<p>
+ Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <style type="text/css">
+ .foo { color: red; }
+ </style>
+ <link rel="stylesheet" type="text/css" href="styles/all_styles.css">
+ </head>
+ <body>
+ <script src="script.js" type="text/javascript"></script>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+
+<p>
+ In some browsers, the original version will flash quickly as the
+ browser will render the "Hello, world!" text before it sees the style
+ tags providing definitions for the CSS classes. This transformation
+ will eliminate that flash, but the end result will be the same.
+</p>
+
+<h3>Example</h3>
+<p>
+ You can see the filter in action at <code>www.modpagespeed.com</code> on this
+ <a href="https://www.modpagespeed.com/examples/move_css_to_head.html?ModPagespeed=on&ModPagespeedFilters=move_css_to_head">example</a>.
+</p>
+
+<h2>Limitations</h2>
+<p>
+ This filter operates within the scope of a "flush window". Specifically,
+ large, or dynamically generated HTML files may be "flushed" by the
+ resource generator before they are complete. If the filter
+ encounters a flush after the end of the <code><head></code> section,
+ subsequently encountered CSS elements will not be moved into the
+ <code><head></code> section.
+</p>
+
+<h2>Risks</h2>
+<p>
+ This filter is considered low risk. However, JavaScript that is
+ executed before a CSS element will see a different view of the DOM in
+ the presence of this rewriter: the CSS element will now be in the head.
+ If there is such JavaScript embedded in the middle of a page then this
+ rewriter may change its behavior.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-dedup-inlined-images.html b/doc/filter-dedup-inlined-images.html
new file mode 100644
index 0000000..f86e240
--- /dev/null
+++ b/doc/filter-dedup-inlined-images.html
@@ -0,0 +1,110 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Deduplicate Inlined Images</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Deduplicate Inlined Images</h1>
+<h2>Configuration</h2>
+<p>
+ The 'Deduplicate Inlined Images' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters dedup_inlined_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters dedup_inlined_images;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Objective</h2>
+<p>
+ Reduce the transfer size of HTML files by eliminating redundant image data
+ URLs.
+</p>
+
+<h2>PageSpeed Rule</h2>
+<p>
+ This rewriter implements the PageSpeed rule for
+ <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload#CompressImages">optimizing
+ images</a>.
+</a>
+</p>
+
+<h2>Description</h2>
+<p>
+ dedup_inlined_images replaces repeated inlined images with JavaScript
+ that loads the image from the first occurence of the image. If the first
+ image doesn't have an <code>id</code>, one is generated and added to it.
+</p>
+
+<h2>Operation</h2>
+<p>
+ dedup_inlined_images rewrites inlined images:
+ <ul>
+ <li>If the image's data URL has not appeared earlier in the page then,
+ if it doesn't already have one an <code>id</code> attribute is
+ generated and added to the tag, then the existing/added <code>id</code>
+ is recorded along with the data URL for comparison with subsequent
+ inlined images.</li>
+ <li>Otherwise, the <code><img></code> tag is replaced with an
+ inline <code><script></code> tag that replaces itself with an
+ <code><img></code> tag, loading the data URL from the preceding
+ <code><img></code> tag with the <code>id</code> matching this
+ tag's data URL.</li>
+ </ul>
+</p>
+
+<h3>Example</h3>
+<p>
+ The effect of this filter can be observed on modpagespeed.com
+ <a href="https://www.modpagespeed.com/examples/dedup_inlined_images.html?ModPagespeed=off">before</a>
+ and
+ <a href="https://www.modpagespeed.com/examples/dedup_inlined_images.html?ModPagespeed=on&ModPagespeedFilters=inline_images,dedup_inlined_images">after</a>
+ rewriting.
+</p>
+
+<h2>Requirements</h2>
+<p>
+ The <a href="filter-image-optimize#inline_images">inline_images</a>
+ filter should be enabled for this filter to have any effect although it
+ will apply to inlined images in the original HTML.
+</p>
+
+<h2>Risks</h2>
+<p>
+ dedup_inlined_images is considered low risk. It is possible for the
+ resulting HTML to be larger than the original due to the size of the injected
+ JavaScript but this is expected to be rare and not a large increase.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
+
diff --git a/doc/filter-domain-rewrite.html b/doc/filter-domain-rewrite.html
new file mode 100644
index 0000000..5473872
--- /dev/null
+++ b/doc/filter-domain-rewrite.html
@@ -0,0 +1,95 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Rewrite Domains</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Rewrite Domains</h1>
+
+
+
+<h2>Configuration</h2>
+<p>
+The 'Rewrite Domains' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_domains</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_domains;</pre>
+</dl>
+<p>
+in the configuration file. The filter is not enabled by default and
+should be added manually to the configuration file.
+</p>
+<p>
+<a name="DomainRewriteHyperlinks"></a>
+By default <code>rewrite_domains</code> only applies to resources, but it can
+optionally rewrite domains in hyperlinks as well:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDomainRewriteHyperlinks on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed DomainRewriteHyperlinks on;</pre>
+</dl>
+
+<h2>Description</h2>
+<p>
+This filter applies all <a href="domains">domain mapping
+directives</a> specified in pagespeed.conf to web resources that
+are <strong>not</strong> otherwise rewritten by PageSpeed. For
+example, if a resource is not cacheable, or filters which affect the
+resource are turned off, then it still may be desirable to apply
+domain sharding. (Domain sharding is not applied to hyperlinks even if <code><a
+href="#DomainRewriteHyperlinks">DomainRewriteHyperlinks</a></code> is enabled.)
+
+</p>
+
+<h2>Requirements</h2>
+<p>It is the responsibility of the site administrator to set up the
+shard entries in their DNS or CNAME configuration. Also, please see
+the <a href="domains#equiv_servers">note</a> about the servers
+for rewrite domains — this applies to sharded domains as well. The
+sharded domains must have access to the same content as the original
+domain.
+</p>
+
+<h2>Risks</h2>
+<p>
+It is the responsbility of the site administrator to ensure that moving
+resources onto domains does not create a security vulnerability. In particular,
+if the target domain has cookies, then any JavaScript loaded from a resource
+moved to a domain with cookies will gain access to those cookies. In general,
+moving resources to a cookieless domain is a great way to improve security. Be
+aware that CSS can load JavaScript in certain environments.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-flatten-css-imports.html b/doc/filter-flatten-css-imports.html
new file mode 100644
index 0000000..c878d97
--- /dev/null
+++ b/doc/filter-flatten-css-imports.html
@@ -0,0 +1,165 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Flatten CSS Imports</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Flatten CSS Imports</h1>
+<h2>Configuration</h2>
+<p>
+ The 'Flatten CSS Imports' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters flatten_css_imports</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters flatten_css_imports;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+<p>
+ When this filter is enabled, you may also enable the following setting:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCssFlattenMaxBytes bytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CssFlattenMaxBytes bytes;</pre>
+</dl>
+<p>
+ This is the maximum size in bytes of the flattened CSS; if flattening would
+ result in CSS larger than this then flattening will be aborted and the CSS
+ will be left unchanged.
+</p>
+
+<h2>Objective</h2>
+<p>
+ Reduce the number of HTTP round-trips by combining multiple CSS resources
+ into one.
+</p>
+
+<h2>PageSpeed Rule</h2>
+<p>
+ This filter implements the PageSpeed rule for
+ <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt#AvoidCssImport">avoiding CSS
+ imports</a>.
+</a>
+</p>
+
+<h2>Description</h2>
+<p>
+ flatten_css_imports parses linked and inlined CSS and flattens it by
+ replacing all <code>@import</code> rules with the contents of the imported
+ file, repeating the process recursively for each imported file.
+ It works on CSS found in <code><style></code> blocks and
+ <code><link></code> references.
+</p>
+
+<h2>Operation</h2>
+<p>
+ flatten_css_imports recursively processes imported CSS files; if a
+ file cannot be processed then the entire process is aborted and the initial
+ CSS is left unflattened.
+</p>
+<p>
+ The CSS is processed as follows; if any step fails the entire process is
+ aborted and the CSS is left unflattened:
+</p>
+<ol>
+ <li>The CSS is parsed; if there are any errors while parsing
+ <code>@import</code> rules, this step fails.</li>
+ <li>The CSS is checked for any leading <code>@charset</code> rule; if there
+ is one and the specified character set is not the same as the current one
+ then this step fails.</li>
+ <li>All <code>@import</code> rules are removed and the specified files are
+ fetched and processed recursively and each removed <code>@import</code>
+ rule is replaced with its file's flattened contents; if a file cannot be
+ fetched for any reason this step fails.</li>
+ <li>Any rulesets following the <code>@import</code> rules are appended.</li>
+ <li>The resulting CSS is minified; if it can't be minified this step
+ fails.</li>
+ <li>The size of the resulting CSS is checked against the configured maximum
+ for flattened CSS; if it is too big this step fails.</li>
+ <li>Finally, the original <code><style></code> or
+ <code><link></code> is replaced with the minified CSS.</li>
+</ol>
+<p>
+ The initial charset is determined according to
+ <a href="http://www.w3.org/International/O-HTTP-charset.en.php">the rules for
+ HTTP</a>: from the HTML's response headers if any, otherwise from the
+ <code>charset</code> attribute of the <code><link></code> element if
+ any, otherwise it defaults to <code>ISO-8859-1</code>.
+</p>
+<p>
+ <code>@import</code> rules can specify the media type(s) that apply to the
+ imported file, and the initial <code><style></code> or
+ <code><link></code> element can also specify the applicable media types.
+ flatten_css_imports remembers the "containing" media types
+ and if an <code>@import</code> specifies media types it applies the
+ intersection of the containing and specified media types to the imported
+ file; if this is empty then the file is ignored because it cannot apply.
+ This is only done for simple media types, not media expressions. If a
+ flattened file has any media types other than <code>all</code> then its
+ rulesets are wrapped in an appropriate <code>@media</code> rule.
+</p>
+
+<h3>Example</h3>
+<p>
+ The effect of this filter can be observed on modpagespeed.com
+ <a href="https://www.modpagespeed.com/examples/flatten_css_imports.html?ModPagespeed=off">before</a>
+ and
+ <a href="https://www.modpagespeed.com/examples/flatten_css_imports.html?ModPagespeed=on&ModPagespeedFilters=rewrite_css,flatten_css_imports">after</a>
+ rewriting.
+</p>
+
+<h2>Requirements</h2>
+<p>
+ The <a href="filter-css-rewrite">rewrite_css</a>
+ filter must be enabled for this filter to be applied.
+</p>
+
+<h2>Limitations</h2>
+<p>
+ Only CSS referenced by <code><style></code> and <code><link>
+ </code> tags is rewritten. <code>style</code> attributes of HTML elements
+ are not rewritten.
+</p>
+<p>
+ Not all CSS3 or proprietary constructs are parsed. When unhandled syntax
+ is present and the file cannot be parsed completely, the CSS file is left
+ unflattened.
+</p>
+
+<h2>Risks</h2>
+<p>
+ flatten_css_imports is considered moderate risk because it makes the
+ fairly complex media optimization described above.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-head-add.html b/doc/filter-head-add.html
new file mode 100644
index 0000000..32a0df5
--- /dev/null
+++ b/doc/filter-head-add.html
@@ -0,0 +1,98 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Add Head</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Add Head</h1>
+
+
+
+<h2>Configuration</h2>
+<p>
+The 'Add Head' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters add_head</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters add_head;</pre>
+</dl>
+<p>
+in the configuration file, but it is also enabled automatically by several
+other filters, including combine_heads, move_css_to_head, and
+add_instrumentation.
+</p>
+
+<h2>Description</h2>
+<p>
+The 'Add Head' filter is very simple: it adds a head to the document if it
+encounters a <body> tag before finding a <head> tag.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+
+<h2>Note</h2>
+<p>
+This filter exists primarily to ensure that other filters have a place
+to insert new tags that needs to be in the head, or that trigger on
+the closing-tag for a head to perform some other action.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered minimal risk.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-head-combine.html b/doc/filter-head-combine.html
new file mode 100644
index 0000000..4dff62b
--- /dev/null
+++ b/doc/filter-head-combine.html
@@ -0,0 +1,141 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Combine Heads</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Combine Heads</h1>
+
+
+<h2>Configuration</h2>
+<p>
+The 'Combine Heads' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters combine_heads</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters combine_heads;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+'Combine Heads' combines multiple heads into one. Technically HTML documents
+are not allowed to have multiple <code><head></code> sections, but sites
+which aggregate content from multiple sources sometimes have them. This filter
+moves the content from later <code><head></code> sections into the first
+head. This filter can change the order of content (e.g. CSS and JS) in the
+later <code><head></code> sections relative to
+intervening <code><body></code> elements.
+</p>
+
+<h2>Operation</h2>
+<p>
+The 'Combine Heads' filter operates by moving the content of
+all <code><head></code> sections into the first <code><head></code>
+section.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="styles/yellow.css">
+ <link rel="stylesheet" type="text/css" href="styles/blue.css">
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+ <head>
+ <link rel="stylesheet" type="text/css" href="styles/big.css">
+ <link rel="stylesheet" type="text/css" href="styles/bold.css">
+ </head>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="styles/yellow.css">
+ <link rel="stylesheet" type="text/css" href="styles/blue.css">
+ <link rel="stylesheet" type="text/css" href="styles/big.css">
+ <link rel="stylesheet" type="text/css" href="styles/bold.css">
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/combine_heads.html?ModPagespeed=on&ModPagespeedFilters=combine_heads">example</a>.
+</p>
+
+<h2>Limitations</h2>
+The 'Combine Heads' filter operates within the scope of a "flush window".
+Specifically, large or dynamically generated HTML files my be "flushed"
+by the resource generator before they are complete. If the CSS combiner
+encounters a Flush prior to the end of the first <code><head></code>,
+then subsequent <code><head></code>s will not be merged in.
+
+<h2>Note</h2>
+<p>
+In some browsers, the original version will flash quickly as the browser
+will render the "Hello, world!" text before it sees second set of
+style tags providing definitions for "big and bold". This
+transformation will eliminate that flashing, but the end result will
+be the same.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered medium-risk. If there are style or script tags in the
+body, between two heads, then this rewrite pass can change their order. The
+risk is reduced if the <a href="filter-css-to-head">move_css_to_head</a> filter
+is also enabled. Additionally, JavaScript that is executed before a
+later <code><head></code> will see a different view of the DOM in the
+presence of this rewriter. If there is such JavaScript embedded in the middle
+of a page then this rewriter may change its behavior.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-hint-preload-subresources.html b/doc/filter-hint-preload-subresources.html
new file mode 100644
index 0000000..362fc2a
--- /dev/null
+++ b/doc/filter-hint-preload-subresources.html
@@ -0,0 +1,123 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Hint Resource Preloading</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Hint Resource Preloading</h1>
+
+<p class="note"><strong>Note: New feature as of 1.12.34.1.</strong></p>
+<h2>Configuration</h2>
+<p>
+ The 'Hint Resource Preloading' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters hint_preload_subresources</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters hint_preload_subresources;</pre>
+</dl>
+<p>
+ in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+ 'Hint Resource Preloading' uses <a href="http://w3c.github.io/preload">
+ resource preloading</a> HTTP headers to inform browsers of CSS and JavaScript
+ resources early in page processing, to permit them to fetch them earlier
+ than would otherwise be possible.
+</p>
+
+<h2>Operation</h2>
+<p>
+ The 'Hint Resource Preloading' filter operates by inserting HTTP headers based
+ on content observed in the HTML page (and CSS loaded from it) on earlier
+ visits; it does not alter the HTML.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint lang-html">
+<link rel="stylesheet" type="text/css" href="styles/all_styles.css">
+<img src="bigimage.jpeg">
+<script src="script.js" type="text/javascript"></script>
+</pre>
+Where <code>all_styles.css</code> contains:
+<pre class="prettyprint lang-html">
+@import url("basic.css");
+@import url("fancy.css");
+@import url("print.css") print;
+</pre>
+
+<p>
+ Then PageSpeed will add the following HTTP headers to the page:
+</p>
+<pre class="prettyprint">
+link: </styles_all_styles.css>; rel=preload; as=style; nopush
+link: </basic.css>; rel=preload; as=style; nopush
+link: </fancy.css>; rel=preload; as=style; nopush
+link: </script.js>; rel=preload; as=script; nopush
+</pre>
+
+<h3>Example</h3>
+<p>
+ You can see the filter in action at <code>www.modpagespeed.com</code> on this
+ <a href="https://www.modpagespeed.com/examples/hint_preload_subresources.html?PageSpeed=on&PageSpeedFilters=hint_preload_subresources">example</a>.
+</p>
+
+<h2>Limitations</h2>
+<p>This filter only discovers resources specified in the HTML.
+Additionally it can follow one level of <code>@import</code> inclusion from
+<code><link></code>ed stylesheets to find additional stylesheets to hint.
+Resources loaded by scripts and further inside CSS will not be hinted for
+preloading. The filter itself does not look inside <code><style></code>
+blocks, but the default-enabled <a href="filter-css-inline-import">
+inline_import_to_link</a> filter can make some of their contents accessible.</p>
+
+<p>The filter cannot understand complex media queries, so it will handle them
+conservatively, assuming the resource isn't needed. </p>
+
+<p>When optimizations done by other filters expire, hints for optimizing those
+resources will not be generated (as it is unknown whether they'll get
+re-optimized at the point the HTTP headers are generated). </p>
+
+<h2>Risks</h2>
+<p> This filter is considered low risk. Since it only adds HTTP headers it is
+extremely unlikely to affect page correctness, as HTTP headers are generally
+invisible to web page operation, though a script using
+<code>XMLHttpRequest</code> to request a rewritten page would be able to
+observe them. </p>
+
+<p> However, the addition of extra headers can be counterproductive if the
+resources they hint are already easy to discover from the browser's parser,
+especially in HTTP/1, which lacks header compression. </p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-image-optimize.html b/doc/filter-image-optimize.html
new file mode 100644
index 0000000..e161f45
--- /dev/null
+++ b/doc/filter-image-optimize.html
@@ -0,0 +1,603 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Optimize Images</title>
+ <link rel="stylesheet" href="doc.css">
+</head>
+<body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Optimize Images</h1>
+<h2>Introduction</h2>
+<p>
+The PageSpeed Modules optimize your images to minimize their size and thus
+reduce their load time. They remove non-visible image information and apply
+high-efficiency compression techniques. This can result in a data saving of
+50% or more.
+</p>
+<p>
+Using PageSpeed Modules, you can focus on the content of your site, knowing
+your visitors will receive images in the best format and dimensions for their
+device and browser while using minimum bandwidth.
+</p>
+
+<h2>Optimization methods</h2>
+<p>
+PageSpeed Modules can optimize most common image formats, including GIF, PNG,
+and JPEG, and convert them to PNG, JPEG, or WebP. GIF, PNG, and JPEG are
+supported by all browsers. WebP is a modern image format that can compress
+images <a href="https://developers.google.com/speed/webp/">over 25%</a>
+more than older formats, and is currently supported by many browsers,
+including Google Chrome, Android 4.0+, and Opera. PageSpeed-optimized images
+are converted to the best format supported by the target browser, i.e.,
+to WebP if it is supported, or PNG or JPEG if not.
+</p>
+<p>
+PageSpeed can also maximize compression based on image content. Lossy formats
+compress images far better than lossless formats, but sometimes introduce
+visible and undesirable "compression noise". PageSpeed examines the content
+of images to see whether they are sensitive to compression noise and, if so,
+converts to PNG or the lossless mode of WebP; if not, it converts to JPEG or
+the lossy mode of WebP.
+</p>
+
+<h2>In-place optimization vs. tag rewriting</h2>
+<p>
+PageSpeed is capable of doing all this without changing your HTML or CSS, known
+as In-Place Resource Optimization (IPRO). However, if you allow PageSpeed to
+modify your HTML and CSS, it can do even more. For example, PageSpeed can
+shrink images to their actual rendered dimensions, thereby using fewer pixels
+and offering additional byte savings. It can also inline small images into HTML
+or CSS to avoid additional round trips to your server for fetching the images.
+</p>
+<p>
+This table shows some examples of how PageSpeed can modify your HTML.
+</p>
+<table>
+ <tr>
+ <th colspan="2">Example 1</th>
+ </tr>
+ <tr>
+ <td>Before optimization</td>
+ <td><code>
+ <img src="images/Image1.gif"/>
+ </code></td>
+ </tr>
+ <tr>
+ <td>After optimization</td>
+ <td><code>
+ <img src="images/xImage1.gif.pagespeed.ic.GSLMcHP-fl.png"/>
+ </code></td>
+ </tr>
+ <tr>
+ <td>Explanation</td>
+ <td>Image converted from GIF to PNG format and
+ <a href="filter-cache-extend">cache-extended</a>.
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">Example 2</th>
+ </tr>
+ <tr>
+ <td>Before optimization</td>
+ <td><code>
+ <img src="images/Image2.png" width="256" height="192"/>
+ </code></td>
+ </tr>
+ <tr>
+ <td>After optimization</td>
+ <td><code>
+ <img src= "images/256x192xImage2.png.pagespeed.ic.ryODdDEGKc.png"
+ width="256" height="192"/>
+ </code></td>
+ </tr>
+ <tr>
+ <td>Explanation</td>
+ <td>Image resized to 256 x 192 pixels, recompressed to PNG, and
+ cache-extended.
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">Example 3</th>
+ </tr>
+ <tr>
+ <td>Before optimization</td>
+ <td><code>
+ <img src="images/Image3.jpg" width="65" height="70"/>
+ </code></td>
+ </tr>
+ <tr>
+ <td>After optimization</td>
+ <td><code>
+ <img src="data:image/jpeg;base64,...Base64 data"/>
+ </code></td>
+ </tr>
+ <tr>
+ <td>Explanation</td>
+ <td>Image resized and then inlined into HTML as Base64 data. Because the
+ inlined data has the desired dimensions, width and height are no longer
+ needed.
+ </td>
+ </tr>
+</table>
+
+<p>
+<b>Tip</b>: There are multiple ways to tell PageSpeed Modules not to modify
+certain images.
+<ul>
+ <li>
+ To avoid modifying a group of images, e.g., images under
+ a certain folder or images named after a pattern, you can use the
+ <a href="restricting_urls">Disallow</a> option.
+ </li>
+ <li>
+ To avoid modifying the contents of an image, you can add a
+ <code>Cache-Control: no-transform</code> response header to the image.
+ This header can be overridden by the
+ <a href="configuration#notransform">DisableRewriteOnNoTransform</a>
+ option.
+ </li>
+ <li>
+ To avoid modifying an <code>img</code> tag, you can use the
+ <code>data-pagespeed-no-transform</code> attribute, i.e.,<br>
+ <code><img src="do-not-modify.png" data-pagespeed-no-transform/>
+ </code>.
+ </li>
+</ul>
+</p>
+
+<h2>Image formats</h2>
+<p>
+PageSpeed Modules support the most common image formats used on the web.
+</p>
+<table>
+ <tr>
+ <td>
+ <a href="https://en.wikipedia.org/wiki/GIF">GIF</a>
+ </td>
+ <td>
+ A legacy but still popular image format. GIF is a lossless format,
+ so the compressed image is visually identical to the original. It
+ supports both single frame (still image) and multiple frames (animation).
+ Despite its popularity, GIF often has poor compression performance,
+ so PageSpeed converts GIF images to other (better) formats, unless the
+ images are tiny.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="https://en.wikipedia.org/wiki/Portable_Network_Graphics">PNG</a>
+ </td>
+ <td>
+ A more recent lossless format designed as a successor to GIF for
+ single-frame images.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="https://en.wikipedia.org/wiki/JPEG">JPEG</a>
+ </td>
+ <td>
+ A lossy format where the compression process removes image detail
+ that is difficult for the human eye to see. How much data to remove
+ depends on the quality level. JPEG has two modes, baseline and
+ progressive. Progressive mode can be used to render the image
+ incrementally and has a higher compression ratio for large images.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="https://en.wikipedia.org/wiki/WebP">WebP</a>
+ </td>
+ <td>
+ A cutting-edge image format. While it is not yet supported in all
+ browsers, it is becoming
+ <a href="https://developers.google.com/speed/webp/faq">increasingly
+ available</a>.
+ In addition to superior compression performance, it includes features
+ of all other formats: lossy mode, lossless mode, transparency,
+ and animation. WebP has added support for these features over time,
+ so your visitor's browser may support all, a subset, or none of these
+ features. PageSpeed automatically detects the features which your
+ visitor's browser supports and only uses the supported features in
+ optimization.
+ </td>
+ </tr>
+</table>
+
+<h2 id="filters">Filters</h2>
+<p>
+PageSpeed Modules provide specific filters so you can control exactly how
+your images are optimized. For each visitor, PageSpeed Modules choose the best
+format and mode from the ones you allowed and the ones supported by the
+visitor's browser.
+<p>
+</p>
+To simplify configuration, PageSpeed Modules provide
+<a href="reference-image-optimize#rewrite_images">rewrite_images</a>,
+a filter group that consists of the most common image optimizations.
+It allows recompression, transcoding to optimal formats, reduction of image
+dimensions, and inlining of small images into HTML or CSS. If you want to make
+more detailed adjustments, you can also enable or disable the individual
+filters:
+</p>
+
+<ul>
+ <li>To PNG format:
+ <a href="reference-image-optimize#convert_gif_to_png">convert_gif_to_png</a>,
+ <a href="reference-image-optimize#recompress_png">recompress_png</a>.
+ </li>
+ <li>To JPEG format:
+ <a href="reference-image-optimize#convert_png_to_jpeg">convert_png_to_jpeg</a>,
+ <a href="reference-image-optimize#convert_jpeg_to_progressive">
+convert_jpeg_to_progressive</a>,
+ <a href="reference-image-optimize#recompress_jpeg">recompress_jpeg</a>.
+ </li>
+ <li>To WebP format:
+ <a href="reference-image-optimize#convert_jpeg_to_webp">convert_jpeg_to_webp</a>,
+ <a href="reference-image-optimize#convert_to_webp_lossless">
+ convert_to_webp_lossless</a>,
+ <a href="reference-image-optimize#convert_to_webp_animated">
+ convert_to_webp_animated</a>,
+ <a href="reference-image-optimize#recompress_webp">recompress_webp</a>.
+ </li>
+ <li>General:
+ <a href="reference-image-optimize#inline_images">inline_images</a>,
+ <a href="reference-image-optimize#resize_images">resize_images</a>.
+ </li>
+</ul>
+
+<p>
+You can use any combination of the filter group and individual filters for
+your site. In each case, images are optimized only to the formats that are
+supported by your visitor's browser, and images are replaced only when the
+optimized one is smaller than the original.
+</p>
+
+<h2 id="image-quality">Image quality</h2>
+<p>
+For images that are sensitive to compression noise, PageSpeed Modules always
+use lossless compression; for other images, PageSpeed Modules use the more
+aggressive lossy methods. For the lossy formats you can specify up to three
+quality levels, indicated by specific situations:
+</p>
+<ul>
+<li>
+When the user indicates a
+<a href="https://support.google.com/chrome/answer/2392284">
+preference for reduced data usage</a>.
+</li>
+<li>
+When the user visits your site from a mobile device. Mobile devices usually
+have a high device pixel ratio, so compression noise is less visible.
+In addition, mobile devices are more likely to use an expensive data channel.
+</li>
+<li>
+For all other cases, e.g., when the user visits your site from a desktop or
+tablet.
+</li>
+</ul>
+
+<p>
+If your visitors have high transfer costs, slow connection speeds, or for
+other reasons, they may prefer reduced data usage. Some browsers, including
+<a href="https://developer.chrome.com/multidevice/data-compression">Chrome</a>,
+<a href="https://developers.google.com/web/updates/2016/02/save-data">Opera</a>,
+and <a href="https://developers.google.com/web/updates/2016/02/save-data">
+Yandex</a>, let visitors choose to send a
+<a href="http://httpwg.org/http-extensions/client-hints.html#the-save-data-hint">
+Save-Data</a> header when they request pages. You can honor their preference by
+allowing lower image quality for such requests.
+</p>
+<p>
+The image quality levels can be specified using various parameters, listed here
+in order of precedence.
+</p>
+
+<ol>
+<li>
+Format-specific qualities for save-data:
+<a href="reference-image-optimize#JpegQualityForSaveData">
+JpegQualityForSaveData</a> and
+<a href="reference-image-optimize#WebpQualityForSaveData">
+WebpQualityForSaveData</a>.
+</li>
+<li>
+Format-specific qualities for mobile:
+<a href="reference-image-optimize#JpegRecompressionQualityForSmallScreens">
+JpegRecompressionQualityForSmallScreens</a>,
+<a href="reference-image-optimize#WebpRecompressionQualityForSmallScreens">
+WebpRecompressionQualityForSmallScreens</a>, and
+<a href="reference-image-optimize#WebpAnimatedRecompressionQuality">
+WebpAnimatedRecompressionQuality</a>.
+</li>
+<li>
+Format-specific qualities for all other cases:
+<a href="reference-image-optimize#JpegRecompressionQuality">
+JpegRecompressionQuality</a>,
+<a href="reference-image-optimize#WebpRecompressionQuality">
+WebpRecompressionQuality</a>, and
+<a href="reference-image-optimize#WebpAnimatedRecompressionQuality">
+WebpAnimatedRecompressionQuality</a>.
+</li>
+<li>
+Format-generic quality for all other cases:
+<a href="reference-image-optimize#ImageRecompressionQuality">
+ImageRecompressionQuality</a>.
+</li>
+</ol>
+
+<p>
+Each parameter has a range of 0 - 100, representing lowest to
+highest quality. They can also be set to -1, indicating that the
+parameter should be ignored and the parameters of the lower precedences should
+be used. If all of the quality parameters are set to -1, images will
+not be optimized to any lossy format.
+</p>
+<p>
+<b>Tip</b>: If you do not want to recompress lossy-format images or convert
+images to lossy formats, it is best to disable any filter that would
+<a href="#filters">optimize to JPEG or WebP</a>. Setting all
+of the qualities to -1 wastes CPU to achieve the same result.
+</p>
+
+<h2>Image dimensions</h2>
+<p>
+PageSpeed Modules can shrink an image to its actual display dimensions based
+on the design of the page, the visitor's device, and the visitor's actions,
+to ensure the best user experience without wasting pixels.
+<p>
+You can use the
+<a href="reference-image-optimize#resize_images">resize_images</a> filter to
+shrink the image to the dimensions specified by the <code>width=</code> and
+<code>height=</code> attributes in the <code><img></code> tag or by the
+inline <code>style=</code> attribute.
+</p>
+<p>
+If you cannot use the
+<a href="reference-image-optimize#resize_images">resize_images</a> filter,
+you can use the
+<a href="reference-image-optimize#resize_rendered_image_dimensions">
+resize_rendered_image_dimensions</a>
+filter to shrink the images to their rendered dimensions. In this case,
+PageSpeed injects JavaScript into your HTML that will report the rendered
+dimensions to the server, known as "beaconing". After receiving a few beacons,
+PageSpeed identifies the dimensions, and shrinks the images.
+</p>
+<p>
+You can use the
+<a href="filter-image-responsive#configuration">responsive_images</a>
+filter to ensure your visitor sees full-resolution images, whether they are
+using a retina-based or regular device. Sending full resolution images to all
+devices is challenging because different devices may use a different number of
+pixels (known as device pixels) for displaying a region of the page
+(measured by CSS pixels). For example, a region of 100x100 CSS pixels in a
+page is displayed using 100x100 device pixels on an iPhone 3, 200x200 device
+pixels on an iPhone 6, and 300x300 device pixels on an iPhone 6+. For the best
+visual effect using the least bandwidth, you can resize your image to 100x100
+for iPhone 3, to 200x200 for iPhone 6, and to 300x300 for iPhone 6+. Using this
+filter, PageSpeed generates images at all of these dimensions, and then
+modifies the <code><img></code> tags so your visitor's browser uses the
+best size.
+</p>
+<p>
+Taking the <a href="filter-image-responsive#configuration">responsive_images</a>
+filter one step further, you can use the
+<a href="filter-image-responsive#configuration">responsive_images_zoom</a>
+filter to send images of higher resolutions when your visitor zooms in. Using
+this filter, PageSpeed injects JavaScript into your HTML that checks the zoom
+level of the page and fetches a higher-resolution image if necessary. On the
+back end, PageSpeed resizes the image to the proper resolutions.
+</p>
+
+<h2>Inline images</h2>
+<p>
+In addition to making the images smaller, PageSpeed Modules can help your page
+load faster by inlining images or previews into your HTML or CSS.
+</p>
+<p>
+PageSpeed can inline small images directly into the HTML or CSS, reducing
+server requests. This is enabled by the
+<a href="reference-image-optimize#inline_images">inline_images</a> filter,
+and is controlled by the
+<a href="reference-image-optimize#ImageInlineMaxBytes">ImageInlineMaxBytes</a>
+and <a href="reference-image-optimize#CssImageInlineMaxBytes">
+CssImageInlineMaxBytes</a> options.
+</p>
+<p>
+As well as inlining small images, PageSpeed can inline a reduced-quality
+version of large images into the HTML or CSS and, after the page is loaded,
+replace the low-quality image with the original. See
+<a href="reference-image-optimize#inline_preview">Inline Preview Images</a>
+for details.
+</p>
+
+<h2 id="srcsets">Srcsets</h2>
+<p class="note"><strong>Note: New feature as of 1.12.34.1.</strong></p>
+
+<p>
+In addition to optimizing image <code>src</code> attributes, as of 1.12.34.1
+PageSpeed will now also optimize images referenced in <code>srcset</code>s.
+This includes all PageSpeed image optimizations except resizing.
+</p>
+
+<p>
+PageSpeed can also automatically insert <code>srcset</code> attributes. See the
+the <a href="filter-image-responsive#configuration">responsive_images</a>
+filter for configuration instructions.
+</p>
+
+<h2>Other controls</h2>
+<p>
+PageSpeed Modules provide controls to make sure that your server is stable,
+your proxy/CDN (if any) is fully utilized, and your images are delivered to
+the user in the format you want.
+</p>
+<p>
+Image optimization is an expensive process. To ensure the stability of your
+server, you can use
+<a href="reference-image-optimize#ImageResolutionLimitBytes">
+ImageResolutionLimitBytes</a>
+to limit the maximum dimensions of images to optimize, and
+<a href="reference-image-optimize#ImageMaxRewritesAtOnce">
+ImageMaxRewritesAtOnce</a>
+to limit the maximum number of images that are concurrently optimized.
+</p>
+<p>
+To ensure that your proxy/CDN can handle the optimized images correctly,
+you can use <a href="reference-image-optimize#AllowVaryOn">AllowVaryOn</a>
+to tell PageSpeed which request headers can be used to control image
+optimization. You can also use
+<a href="reference-image-optimize#NoTransformOptimizedImages">NoTransformOptimizedImages</a>
+to instruct proxies not to further compress the images.
+</p>
+<p>
+The
+<a href="reference-image-optimize#serve_webp_urls">
+ServeRewrittenWebpUrlsToAnyAgent</a>
+option can be used to tell PageSpeed how to respond to a request asking for a
+WebP image when the browser does not appear to support WebP. In this case,
+PageSpeed will normally return the image as a PNG or JPEG (whichever is most
+appropriate). If <code>ServeRewrittenWebpUrlsToAnyAgent</code> is enabled,
+PageSpeed will instead return the WebP unconditionally. Returning the image
+depending on the headers ensures that your visitor sees the image correctly.
+Returning the image unconditionally in WebP format is useful if you want to
+serve WebP but your CDN or proxy removes headers from the request.
+</p>
+<p>
+You can also ask PageSpeed to insert the image dimensions into
+<code><img></code> tags so the browser can compute the layout of the
+page before downloading the images. See
+<a href="reference-image-optimize#insert_image_dimensions">
+insert_image_dimensions</a>
+filter for more information.
+</p>
+
+<h2 id="Risks">Risks</h2>
+<p>
+Image optimization is not perfect, and its use can have some downsides. Here
+are some potential issues and suggested solutions.
+</p>
+
+<table>
+ <tr>
+ <td>
+ <p><em>
+ Image optimization is both CPU- and memory-intensive.
+ </em></p>
+ <p>
+ You will probably see your server load increase while images are being
+ rewritten, particularly immediately after server start. If the load
+ increases too much, you can alleviate it by setting
+ <a href="reference-image-optimize#ImageMaxRewritesAtOnce">
+ ImageMaxRewritesAtOnce</a> and
+ <a href="reference-image-optimize#ImageResolutionLimitBytes">
+ ImageResolutionLimitBytes</a>.
+ After the images have been optimized once, they will be cached for
+ future use.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><em>
+ Reducing the dimension of an image or compressing it to a lossy format
+ causes some image details to be lost.
+ </em></p>
+ <p>
+ This is sometimes noticeable, though usually not; you should inspect
+ the optimized images to ensure their quality is acceptable.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><em>
+ PageSpeed removes metadata, such as copyright information.
+ </em></p>
+ <p>
+ If you want keep a specific image's metadata, add
+ <code>data-pagespeed-no-transform</code> attribute. PageSpeed does not
+ remove watermarks.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><em>
+ It is possible to craft an image that, after re-compression, looks
+ like HTML to certain browsers.
+ </em></p>
+ <p>
+ While PageSpeed adds proper content-type headers and headers that
+ forbid content-type sniffing, some ancient browsers can still be
+ tricked into rendering them as HTML. If you have user-submitted images,
+ you should filter them before using them in your site.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><em>
+ Your beacons may need a new attribute.
+ </em></p>
+ <p>
+ If you use images as beacons to monitor page activity, you should add
+ <code>data-pagespeed-no-transform</code> attribute to them. Otherwise,
+ PageSpeed may optimize the images and the activity will not be reported
+ to you.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><em>
+ Images may incur stretching distortion if you ask PageSpeed Modules to
+ insert image dimensions.
+ </em></p>
+ <p>
+ If you use <code>insert_image_dimensions</code> on pages where your
+ CSS modifies image sizes, the images may appear distorted. Again,
+ inspect compressed images for render dimensions.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p><em>
+ Color profiles are removed by PageSpeed.
+ </em></p>
+ <p>
+ If your images contain color profiles, they are removed to save data.
+ This is usually not a problem since most images with a color profile
+ render indistinguishably when the color profile is removed.
+ </p>
+ </td>
+ </tr>
+</table>
+
+</div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-image-responsive.html b/doc/filter-image-responsive.html
new file mode 100644
index 0000000..22e0fd9
--- /dev/null
+++ b/doc/filter-image-responsive.html
@@ -0,0 +1,162 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Responsive Images</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Responsive Images</h1>
+<p class="note"><strong>Note: New filter as of 1.10.33.0</strong></p>
+
+<h2>Configuration</h2>
+<p>
+ The 'Responsive Images' filter requires the 'Resize Images' filter;
+ these filters are enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters responsive_images,resize_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters responsive_images,resize_images;</pre>
+</dl>
+<p>
+ in the configuration file. An additional zoom feature can be enabled by
+ specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters responsive_images_zoom</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters responsive_images_zoom;</pre>
+</dl>
+<p id="pagespeed_no_transform">
+ The 'Responsive Images' filter won't optimize an image if it has
+ the <code>data-pagespeed-no-transform</code>
+ or <code>pagespeed_no_transform</code> attribute. Usage:
+</p>
+<pre class="prettyprint">
+ <img src="example.png" data-pagespeed-no-transform>
+</pre>
+
+<h2>Description</h2>
+<p>
+ This filter makes images responsive by adding <code>srcset</code> attributes
+ which provide multiple versions for different pixel density screens.
+</p>
+<p>
+ If <code>responsive_images_zoom</code> is enabled, it also extends the
+ default srcset functionality by loading higher resolution images when the
+ user zooms in.
+</p>
+<p>
+ In order to take advantage of this filter, the original image must
+ explicitly specify <code>height</code> and <code>width</code> attributes
+ and src must be a high enough resolution image (at least 2x larger than
+ these height and width values).
+</p>
+
+<h2>Example</h2>
+<p>
+ For example, if the original HTML looks like this:
+</p>
+<pre class="prettyprint">
+<img src="foo.png" width="100" height="100">
+</pre>
+<p>
+ and <code>foo.png</code> is 1000x1000, then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<img src="100x100xfoo.png.pagespeed.ic.HASH1.png" width="100" height="100"
+ srcset="150x150xfoo.png.pagespeed.ic.HASH2.png 1.5x,200x200xfoo.png.pagespeed.ic.HASH3.png 2x,300x300xfoo.png.pagespeed.ic.HASH4.png 3x, foo.png 10x">
+</pre>
+<p>
+ Which will load the normal 100x100 image on standard displays,
+ higher-resolution 150x150, 200x200 or 300x300 image on 1.5x, 2x, or 3x
+ displays, or the full original 1000x1000 image when users zoom in enough.
+</p>
+<p>
+ If <code>foo.png</code> is 200x200, no 3x or higher version will be added to
+ srcset.
+ If <code>foo.png</code> is only 100x100, no srcset will be added at all.
+</p>
+
+<h3>Online Example</h3>
+<p>
+ You can see the filter in action at <a href="https://www.modpagespeed.com/examples/responsive_images.html?PageSpeed=on&PageSpeedFilters=responsive_images,responsive_images_zoom,rewrite_images,inline_images,resize_images,insert_image_dimensions"><code>www.modpagespeed.com</code></a>.
+</p>
+
+<h2>Limitations</h2>
+<ul>
+ <li>Before 1.12.34.1, PageSpeed would not optimize images referenced in
+ existing <code>srcset</code> attributes.</li>
+ <li>Images must have explicit <code>height</code> and <code>width</code>
+ attributes and src must refer to a higher resolution image.</li>
+ <li>PageSpeed does not mix inline images with <code>srcset</code>s. If the
+ largest size image is inlinable, we just inline that. Otherwise we do not
+ inline any of the images and use a <code>srcset</code> instead.</li>
+ <li>The Responsive Images filter is not compatible with the
+ <a href="filter-local-storage-cache">Local Storage Cache filter</a>.
+ Images modified by the Responsive Images filter will not be stored in
+ Local Storage.</li>
+ <li>PageSpeed's default memory limits keep it from processing images larger
+ than 8 million pixels (8MP). If you have images larger than this, it won't
+ be able to resize them to generate the lower resolution versions. See
+ <a href="reference-image-optimize#ImageResolutionLimitBytes"
+ >ImageResolutionLimitBytes</a> for more details on increasing this limit or
+ resizing source images to be under the limit.</li>
+</ul>
+
+<h2>Risks</h2>
+<p>
+ This filter will increase cache usage by 4x for all images which have
+ explicit <code>width</code> and <code>height</code> attributes.
+ (This is true even if the original image is only 1x.) If this pushes
+ your cache over the <a href=system#file_cache><code>FileCacheSize</code></a>,
+ then you may experience cache churn which makes PageSpeed much less effective.
+</p>
+<p>
+ This filter has the same risks inherent in the 'Resize Images' filter.
+ See <a href="filter-image-optimize#Risks">Optimize Images - Risks</a>
+ for more information.
+</p>
+<p>
+ This filter adds a <code>srcset</code> attribute to images. This will break
+ any JavaScript which changes images by modifying their <code>src</code>
+ attribute. On high-density displays, modifying the <code>src</code> attribute
+ will not actually change the image. As a work-around, you can add a
+ <a href="#pagespeed_no_transform"><code>data-pagespeed-no-transform</code></a>
+ attribute to any <code><img></code> tag to prevent PageSpeed from adding
+ a <code>srcset</code>.
+</p>
+<p>
+ If using <code>responsive_images_zoom</code>, the JavaScript used to
+ implement that feature may conflict with other JS on the page.
+</p>
+
+</div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-image-sprite.html b/doc/filter-image-sprite.html
new file mode 100644
index 0000000..66e1621
--- /dev/null
+++ b/doc/filter-image-sprite.html
@@ -0,0 +1,187 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Sprite Images</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Sprite Images</h1>
+
+
+<h2>Configuration</h2>
+<p>
+The 'Sprite Images' filter requires the 'Rewrite CSS' filter;
+these filters are enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_css,sprite_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_css,sprite_images;</pre>
+</dl>
+<p>
+in the configuration file.
+<h2>Description</h2>
+<p>
+The 'Sprite Images' filter detects GIF and PNG images used as backgrounds in
+CSS. It attempts to combine all such images referenced from a CSS file
+into a single large image. The individual CSS backgrounds are then rewritten to
+point to the single large image, with background positioning declarations so
+that the page appears as it was before. This process is
+called <a href="http://www.alistapart.com/articles/sprites">CSS Spriting</a>.
+This filter is intended to avoid the cumbersome process of managing the sprited
+image and corresponding declarations rather than as a general-purpose optimizer.
+</p>
+<h2>Benefits</h2>
+<p>
+CSS Spriting can benefit page speed in several ways. First, if many small
+images are combined into one large image, the browser will require fewer server
+connections, which can increase parallelism. Second, bytes are saved from the
+overhead of each individual request (both the HTTP headers and the image
+headers); depending on how well the large PNG compresses, this can end up saving
+a substantial amount of bandwidth. Finally, in some browsers it is faster to
+decode one large image than several small ones.
+</p>
+<h2>Example</h2>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <title>Sprite Images</title>
+ <style type="text/css">
+ #bg_Cuppa {
+ background-image:url('images/Cuppa.png');
+ background-repeat:no-repeat;
+ width:65px;
+ height:70px;
+ }
+ #bg_BikeCrashIcn {
+ width:100px;
+ height:100px;
+ background:transparent url('images/BikeCrashIcn.png') 0 0 no-repeat
+ }
+ <style type="text/css">
+ </head>
+ <body>
+ <div id="bg_Cuppa"></div>
+ <div id="bg_BikeCrashIcn"></div>
+ </body>
+</html>
+</pre>
+<p>
+Then <code>sprite_images</code> will rewrite the css into something like this:
+</p>
+<pre class="prettyprint">
+ #bg_Cuppa{
+ background-image:url(<b>images/Cuppa.png+BikeCrashIcn.png.pagespeed.is.Y-XqNDe-in.png</b>);
+ background-repeat:no-repeat;
+ width:65px;
+ height:70px;
+ <b>background-position:0px 0px</b>
+ }
+ #bg_BikeCrashIcn{
+ width:100px;
+ height:100px;
+ background:transparent url(<b>images/Cuppa.png+BikeCrashIcn.png.pagespeed.is.Y-XqNDe-in.png</b>) <b>0px -70px</b> no-repeat;
+ }
+</pre>
+<p>
+You can see the filter in action at <a href="https://www.modpagespeed.com/examples/sprite_images.html?ModPagespeed=on&ModPagespeedFilters=rewrite_css,sprite_images"><code>www.modpagespeed.com</code></a>.
+</p>
+
+<h2>Limitations</h2>
+<p>
+The Sprite Images filter is still experimental, and currently has a number of
+limitations:
+<ul>
+<li><strong>Only PNG and GIF images</strong> are supported; JPG will come in a
+future release.</li>
+<li><strong>Only CSS backgrounds</strong> are supported; <code><img></code> tags will come in a future release.</li>
+<li>A background image can't be safely sprited if the HTML element is larger
+than the background image (since this would allow the combined image's extra
+pixels to show around the edges). Accordingly, the CSS must have
+<strong>explicit width and height</strong> in the same declaration as the
+background URL, and the width and height must be smaller than or equal to those
+of the image.</li>
+<li>The CSS must <strong>not include any background-position declarations
+without background-url declarations</strong>. Such a naked background-position
+declaration could apply to any background-image, and since we don't know which
+one, it isn't safe to do any spriting.</li>
+<li>The Sprite Images filter currently arranges images in a vertical strip,
+which might not be the most efficient arrangement. More advanced layouts
+will come in a future release.</li>
+</ul>
+</p>
+
+<h2>Risks</h2>
+<p>
+Automatically spriting images is low risk. However, there are some potential
+problems to be aware of:
+</p>
+<p>
+<em>Browser caching effectiveness could be degraded.</em> If the pages on your
+site have a high (but not complete) overlap of background images, a visitor
+browsing your site will normally have many of these images cached much of the
+time. After turning on the Sprite Images filter, the user may have to download
+a new (slightly different) sprite for each different page. Expect improvement
+on this front in a future release.
+</p>
+
+<p>
+<em>Your server load could increase.</em> The image processing required to
+combine many small images into one large one could have a memory or CPU impact
+on your server. PageSpeed is designed to minimize this impact,
+but you should keep an eye on it after turning on any image processing filter.
+</p>
+
+<p>
+<em>Your server could be exposed to a new attack vector</em> if you host
+user-submitted images. Processing hostile images on the server could be
+insecure. We recommend that user-submitted images be filtered before
+spriting.
+</p>
+
+<p>
+<em>Your CSS file could get bigger</em> since the URL of the combined image is
+longer than the URL of each individual image. However, if your CSS is served
+compressed (and it definitely ought to be!), this should not make much
+difference, since the extra bytes will be highly compressible.
+</p>
+
+<p>
+<em>Your pages could take more memory</em> to display on the client, since the
+decompressed bitmap of the large image will have more pixels than the sum of the
+small images. This could negatively impact the experience on memory-constrained
+mobile devices.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-inline-preview-images.html b/doc/filter-inline-preview-images.html
new file mode 100644
index 0000000..fbf3b4f
--- /dev/null
+++ b/doc/filter-inline-preview-images.html
@@ -0,0 +1,155 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Inline Preview Images</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Inline Preview Images</h1>
+
+
+<h2>Configuration</h2>
+<p>
+The 'Inline Preview Images' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters inline_preview_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters inline_preview_images;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+The 'Resize Mobile Images' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters resize_mobile_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters resize_mobile_images;</pre>
+</dl>
+in the configuration file.
+
+<h2>Description</h2>
+<p>
+The 'Inline Preview Images' filter generates low quality versions of the
+images that are inlined in the HTML page. Users experience faster rendering of
+the page and the low quality images are replaced by high quality versions after
+an onload event is triggered. The filter works on images found in
+<code><img></code> tags.
+</p>
+<p>
+The 'Resize Mobile Images' filter works like Inline Preview Images, but is
+applied only for mobile browsers, and shrinks the size in pixels of the
+placeholder images on mobile devices to better fit the device screen size. If
+Inline Preview Images is activated and Resize Mobile Images is not,
+full-resolution preview images will be served to both desktop and mobile
+browsers.
+</p>
+<p class="note"><strong>Note:</strong> <code>inline_preview_images</code>
+ and <code>resize_mobile_images</code> should be used together
+ with <code>insert_image_dimensions</code> to avoid reflow as the images load.
+</p>
+
+<h2>Operation</h2>
+The 'Inline Preview Images' filter changes the <code>src</code> attribute of
+<code><img></code> elements to <code>data-pagespeed-high-res-src</code>
+based on a few parameters which are described in next section. It generates low
+quality versions of the images and replaces the <code>src</code> attribute with
+these. The low quality images are replaced by high quality versions after an
+onload event is triggered.
+
+<h2 id="params">Parameters that affect optimization</h2>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxInlinedPreviewImagesIndex IndexNumber</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxInlinedPreviewImagesIndex IndexNumber;</pre>
+</dl>
+<p>
+The first <code>IndexNumber</code> images on the page are replaced by low
+quality images. Negative numbers will result in
+<strong>all</strong> images being rewritten. Zero means no image will be
+rewritten. The default value of this parameter is -1. Refer to the Risks section
+for trade offs on setting this value.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMinImageSizeLowResolutionBytes MinBytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MinImageSizeLowResolutionBytes MinBytes;</pre>
+</dl>
+<p>
+<code>MinBytes</code>, a positive integer, is the minimum size in bytes of
+any image for which a low quality image is generated. No images will be
+rewritten for zero and negative values.
+</p>
+<p id="beacons">
+'Inline Preview Images' injects JavaScript that uses a
+<a href="faq#beacons">beacon</a> to report back to the server the images that
+are visible in the client's initial viewport (<em>above the fold</em>).
+It takes a few accesses of a page for the data to be reported back and
+processed but eventually the above-the-fold images will be known and will be
+replaced with low quality versions while all others will be handled normally;
+until then images are replaced as described above.
+</p>
+<p>
+The use of beacons can be disabled using the
+<a href="config_filters#beacons">ModPagespeedCriticalImagesBeaconEnabled</a>
+directive. If they are disabled, 'Inline Preview Images' will not inject the
+JavaScript and images will be replaced with low quality versions as described
+above.
+</p>
+
+<h3>Example</h3>
+<p>
+You can see the Inline Preview Images filter in action
+at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/inline_preview_images.html?ModPagespeed=on&ModPagespeedFilters=inline_preview_images">example</a>.
+You can also see this
+<a href="https://www.modpagespeed.com/examples/resize_mobile_images.html?ModPagespeed=on&ModPagespeedFilters=resize_mobile_images,insert_image_dimensions">example</a>
+of the Resize Mobile Images filter.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered moderately risky. The main risk is that the HTML
+becomes bloated due to the embedded low quality image data.
+<code>MaxInlinedPreviewImagesIndex</code> should be chosen appropriately;
+otherwise, if images below the fold are inlined, there is no user perceivable
+gain, but the page takes longer to load due to the extra bytes in the HTML.
+</p>
+<p>
+Note that <code>MaxInlinedPreviewImagesIndex</code>
+and <code>MinImageSizeLowResolutionBytes</code> should not be used to disable
+inlining of preview images (for example by setting either parameter to
+0). Instead, the <code>inline_preview_images</code>
+and <code>resize_mobile_images</code> filters themselves should be disabled.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-insert-dns-prefetch.html b/doc/filter-insert-dns-prefetch.html
new file mode 100644
index 0000000..29f73bb
--- /dev/null
+++ b/doc/filter-insert-dns-prefetch.html
@@ -0,0 +1,114 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Pre-Resolve DNS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Pre-Resolve DNS</h1>
+<h2>Objective</h2>
+<p>
+Reduce DNS lookup time by pre-resolving at the browser.
+</p>
+
+ <h2>Configuration</h2>
+ <p>
+ The 'Pre-Resolve DNS' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters insert_dns_prefetch</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters insert_dns_prefetch;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+DNS resolution time varies from <1ms for locally cached results, to hundreds
+of milliseconds due to the cascading nature of DNS. This can contribute
+significantly towards total page load time. This filter reduces DNS lookup time
+by providing hints to the browser at the beginning of the HTML, which allows the
+browser to pre-resolve DNS for resources on the page.
+</p>
+
+<h2>Operation</h2>
+<p>
+This filter inserts the tag <code><link rel="dns-prefetch"></code> (or
+<code><link rel="prefetch"></code> for IE9) in the HEAD section, for all
+domains present in the HTML document.
+</p>
+
+<h2>Example</h2>
+<p>
+The example below shows the HTML before rewriting:
+</p>
+
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <img src="www.domain1.com/image1.jpeg">
+ <script src="www.domain2.com/script1.js">
+ </body>
+</html>
+</pre>
+
+<p>
+and after rewriting:
+</p>
+
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="dns-prefetch" href="//www.domain1.com">
+ <link rel="dns-prefetch" href="//www.domain2.com">
+ </head>
+ <body>
+ <img src="www.domain1.com/image1.jpeg">
+ <script src="www.domain2.com/script1.js">
+ </body>
+</html>
+</pre>
+
+<h2>Limitations</h2>
+<p>
+This filter will be applied only on Firefox 3.5+, Chrome, Safari 5+ and IE
+9+.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered minimal risk.
+</p>
+</div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
+
diff --git a/doc/filter-insert-ga.html b/doc/filter-insert-ga.html
new file mode 100644
index 0000000..000dace
--- /dev/null
+++ b/doc/filter-insert-ga.html
@@ -0,0 +1,81 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Insert Google Analytics</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Insert Google Analytics</h1>
+
+
+
+<h2>Configuration</h2>
+<p>
+The 'Insert Google Analytics' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedEnableFilters insert_ga
+ModPagespeedAnalyticsID <Analytics ID></pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed EnableFilters insert_ga;
+pagespeed AnalyticsID <Analytics ID>;</pre>
+</dl>
+<p>
+in the configuration file. As of 1.10.33.0 the default snippet is
+now <code>analytics.js</code>. To insert <code>ga.js</code> instead, set:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedUseAnalyticsJs false</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed UseAnalyticsJs false;</pre>
+</dl>
+</p>
+
+<h2>Description</h2>
+<p>
+The 'Insert Google Analytics' filter adds the basic Google Analytics javascript
+snippet to each HTML page. If the page already has a Google Analytics snippet
+inside <code><head></code> with the specified ID, then no additional
+snippet will be added. If another Google Analytics snippet is on the page with
+a <em>different</em> ID, then an additional snippet will be added with the ID
+specified in with <code>AnalyticsID</code>. In order to avoid any
+strange Google Analytics reporting, make sure that the ID specified in the
+configuration file matches the one used on your site.
+</p>
+<p>
+This filter does <em>not</em> require
+the <code>make_google_analytics_async</code> filter. The Google Analytics
+snippets inserted by <code>insert_ga</code> are already asynchronous.
+</p>
+<p>
+See <a href="http://modpagespeed.com/insert_ga.html">this example</a> of this
+filter in action.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-instrumentation-add.html b/doc/filter-instrumentation-add.html
new file mode 100644
index 0000000..e114bd5
--- /dev/null
+++ b/doc/filter-instrumentation-add.html
@@ -0,0 +1,215 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Add Instrumentation</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Add Instrumentation</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Add Instrumentation' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters add_instrumentation</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters add_instrumentation;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+The 'Add Instrumentation' filter injects two small blocks of JavaScript
+into every HTML page. These blocks measure the time the client spends
+loading and rendering the page, and report that measurement back to the
+server.
+</p>
+
+<h2>Operation</h2>
+<p>An empty HTML file passed through the add_instrumentation filter will
+come out like this (the inserted whitespace is for documentation
+readability):
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script type='text/javascript'>
+ window.mod_pagespeed_start = Number(new Date());
+ </script>
+ </head>
+ <body>
+ <script type='text/javascript'>
+ function g(){
+ new Image().src = '/mod_pagespeed_beacon?ets=load:'
+ + (Number(new Date())-window.mod_pagespeed_start);
+ };
+ var f = window.addEventListener;
+ if (f) {
+ f('load',g,false);
+ } else {
+ f=window.attachEvent;
+ if (f) {
+ f('onload',g);
+ }
+ }
+ </script>
+ </body>
+</html>
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/add_instrumentation.html?ModPagespeed=on&ModPagespeedFilters=add_instrumentation">example</a>.
+</p>
+
+<h2>Methodology</h2>
+<p>
+The first script tag is inserted at the beginning of the document's
+<code><head></code>. It simply records the current time in a global
+variable. This is placed as early in the document as possible in order to
+best approximate the beginning of the page load.
+</p>
+<p>
+The second script tag is inserted at the end of the document's
+<code><body></code>, so as to minimally interfere with page rendering.
+It registers a listener for the page's onLoad event; this listener computes
+the total time since the first script tag ran, and sends the result back
+to the server asynchronously by using a fake Image object. This technique
+should work on most modern browsers.
+[1].
+</p>
+<p>
+The add_instrumentation filter sends a beacon after the page <code>onload</code>
+handler is called. The user might navigate to a new URL before this. If you
+enable the following directive, the beacon is sent as part of an
+<code>onbeforeunload</code> handler, for pages where navigation happens before
+the <code>onload</code> event.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedReportUnloadTime on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ReportUnloadTime on;</pre>
+</dl>
+By default, the target of the asynchronous callback is the relative URL
+<code>"/mod_pagespeed_beacon"</code> (Apache)
+or <code>"/ngx_pagespeed_beacon"</code> (Nginx). PageSpeed handles these
+results itself and simply returns <code>"204 No Content"</code> which should
+cause minimal disruption for the client. It also records the number of
+callbacks, and the total of their onLoad times, in the statistics <code>
+"page_load_count"</code> and <code>"total_page_load_ms"</code>. These are
+visible on the PageSpeed statistics page (which, by default, is only viewable
+from the server's localhost). You can divide
+<code>total_page_load_ms</code> by <code>page_load_count</code> to get the
+average onLoad time for your site.
+</p>
+<p id="beacon_url">
+You can change the location of the beacon to a different path (or even a
+different server) using the <code>BeaconUrl</code> directive. For example:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedBeaconUrl "/my/path/to/beacon"
+</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed BeaconUrl "/my/path/to/beacon";</pre>
+</dl>
+<p>
+Or, if you want to set up your own beacon server somewhere else, you can use:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedBeaconUrl "http://my.other.server/my_beacon"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed BeaconUrl "http://my.other.server/my_beacon";</pre>
+</dl>
+<p>
+If you want to set an https beacon URL that is different from the http beacon
+URL (for example a different machine as shown below, or a non-default port), you
+can do so by separating the http and https URLs with a space. You don't need to
+do this if the beacon URLs only differ in protocol (http versus https):
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedBeaconUrl "http://insecure.server/my_beacon https://secure.server/my_beacon"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed BeaconUrl "http://insecure.server/my_beacon https://secure.server/my_beacon";</pre>
+</dl>
+<p>
+Note that the BeaconUrl used to require that custom beacon URLs end
+with <code>"?ets="</code>. Appending the query param to the custom URL is no
+longer required and should be removed if present.
+</p>
+<p>
+If you want more detailed information about client load time (e.g. averages for
+different pages and different browsers, median times, historical behavior, etc.)
+you can get this information from your webserver logs. Every beacon load will
+be in your access.log along with the timestamp, referer, IP address, and
+user-agent—which tell you when, where, and by whom the onLoad measurement
+was taken. There are some existing tools to collect and analyze these data; one
+such example is
+<a href="http://code.google.com/p/jiffy-web">Jiffy</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+The "Add Instrumentation" filter requires the "Add Head" filter, and will
+enable it automatically.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter could break pages if they include JavaScript which depends on
+knowing the first child of the <code><head></code> or the last child
+of the <code><body></code>.
+</p>
+<p>
+The injected JavaScript is very lightweight, and should cause only a very tiny
+(though nonzero) amount of extra load on the client.
+</p>
+<p>
+If you already have a client-side latency measurement system in place (such as
+Jiffy, Episodes, or Boomerang), you probably don't need this filter.
+</p>
+<p>
+Note that the data reported by this filter is only approximate and does not
+include time the client spends resolving your domain, opening a connection, and
+waiting for the first few bytes of HTML.
+</p>
+
+<h2>References</h2>
+<ol>
+ <li>Zakas, Nicholas C., <u>High Performance JavaScript</u>. O'Reilly, 2010, p133.
+</ol>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-js-combine.html b/doc/filter-js-combine.html
new file mode 100644
index 0000000..36d2550
--- /dev/null
+++ b/doc/filter-js-combine.html
@@ -0,0 +1,147 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Combine JavaScript</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Combine JavaScript</h1>
+
+
+
+
+<h2>Configuration</h2>
+<p>
+The 'Combine JavaScript' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters combine_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters combine_javascript;</pre>
+</dl>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+'Combine JavaScript' seeks to reduce the number of HTTP requests made by a
+browser during page refresh by replacing multiple distinct JavaScript files with
+a single one.
+</p>
+<p>
+This <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt#CombineExternalJS">practice</a>
+reduces the number of round-trip times.
+</p>
+
+<h2>Example</h2>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/combine_javascript.html?ModPagespeed=on&ModPagespeedFilters=combine_javascript">example</a>.
+</p>
+
+<h2>Parameters that affect JS combining</h2>
+
+<h3 id="MaxCombinedJsBytes">MaxCombinedJsBytes</h3>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxCombinedJsBytes MaxBytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxCombinedJsBytes MaxBytes;</pre>
+</dl>
+<p>
+<code>MaxBytes</code> is the maximum uncompressed size in bytes of the combined
+JavaScript files. JavaScript files larger than <code>MaxBytes</code> will be
+kept intact; other JavaScript files will be combined into one or more files,
+each being no more than <code>MaxBytes</code> in size. The current default value
+for <code>MaxBytes</code> is 92160 (90K).
+</p>
+
+<h2>Limitations</h2>
+<p>The JavaScript Combine filter operates within the scope of a "flush window".
+Specifically, large, or dynamically generated HTML files may be
+"flushed" by the resource generator before they are complete. When the
+filter encounters a flush, it will emit all script combinations seen
+up to the point of the flush. After the flush, it will begin collecting
+a new script combination.
+</p>
+<p>This filter currently cannot combine across inline scripts, and
+IE conditional comments.
+</p>
+<p>This filter generates URLs that are essentially the concatenation
+of the URLs of all the Javascript files being combined. The maximum URL size
+is generally limited to about 2k characters due to IE:
+See <a href="http://support.microsoft.com/kb/208427/EN-US"
+>http://support.microsoft.com/kb/208427/EN-US</a>. Apache servers by
+default impose a further limitation of about 250 characters per URL segment
+(text between slashes). PageSpeed circumvents this limitation when it runs
+under Apache, but if you employ proxy servers in your path you may need to
+re-impose it by overriding the setting here. The default setting is 1024.</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxSegmentLength 250</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxSegmentLength 250;</pre>
+</dl>
+<h2>Requirements</h2>
+<p>
+By default, the filter will combine together script files from different
+paths, placing the combined element at the lowest level common to both
+origins. In some cases, this may be undesirable. You can turn off the
+behavior with:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCombineAcrossPaths off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CombineAcrossPaths off;</pre>
+</dl>
+<h2>Risks</h2>
+<p>
+This filter is considered moderate risk. However, JavaScript can be written that
+walks the DOM looking for <code><script></code> entries with certain
+syntax. Such JavaScript may behave differently on a page which has modified
+script locations and structure.
+</p>
+
+<p>
+ This filter is sensitive to <a href="restricting_urls#aris"><code
+ >AvoidRenamingIntrospectiveJavascript</code></a>. For example,
+ a JavaScript file that
+ calls <code>document.getElementsByTagName('script')</code> will not be
+ combined with other JavaScript files.
+</p>
+
+<p>
+This filter employs the Javascript 'eval' expression to evaluate each
+<script> tag at its proper location in the DOM, but getting the aggregated
+script content in one HTTP fetch. The effects of this are likely to differ
+between browsers, and haven't yet been thoroughly measured.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-js-defer.html b/doc/filter-js-defer.html
new file mode 100644
index 0000000..f70f13e
--- /dev/null
+++ b/doc/filter-js-defer.html
@@ -0,0 +1,154 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Defer JavaScript</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Defer JavaScript</h1>
+ <h2>Configuration</h2>
+ <p>
+ The 'Defer JavaScript' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters defer_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters defer_javascript;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p class="warning">
+<strong>Warning:</strong> Defering JavaScript can often dramatically improve the
+rendering speed of a site, but careful evaluation is required to ensure the
+site continues to operate properly. The limitations are described below.
+</p>
+
+</p>
+<p>
+defer_javascript tries to defer JavaScript execution until page load.
+It defers this by changing the <code>type</code> and <code>src</code>
+attributes of <code><script></code> elements on the HTML page to
+<code>data-pagespeed-orig-type</code> and <code>data-pagespeed-orig-src</code>
+respectively. It also adds a new <code>type</code> attribute whose value is set
+to <code>text/psajs</code>. A <code>window.onload</code> handler is added to
+the HTML, which executes all the deferred scripts.
+</p>
+<p>
+defer_javascript doesn't defer a <code>script</code> tag if it has
+the <code>data-pagespeed-no-defer</code> attribute (preferred)
+or <code>pagespeed_no_defer</code> attribute (deprecated). This is useful when
+a <code>script</code> tag needs to be executed while loading the page. For
+example, a <code>script</code> tag may be updating the main content dynamically
+as a slideshow of images in the visible content of the page. Usage:
+<pre class="prettyprint">
+<script data-pagespeed-no-defer>...</script>
+</pre>
+</p>
+
+<h3>Example</h3>
+<p>
+The effect of this filter can be observed on modpagespeed.com
+<a href="https://www.modpagespeed.com/examples/defer_javascript.html?ModPagespeed=off"
+>before</a>
+and
+<a href="https://www.modpagespeed.com/examples/defer_javascript.html?ModPagespeed=on&ModPagespeedFilters=defer_javascript">after</a>
+rewriting.
+</p>
+
+<h2>Limitations</h2>
+<p>
+Parent variables accessed from an <code>iframe</code> may be
+<code>undefined</code> when defer_javascript is used.
+</p>
+
+<p>
+All JavaScript code is downloaded and executed serially, whereas without
+defer_javascript the browser tries to download JavaScripts in
+parallel as much as possible.
+</p>
+
+<p>
+Calls to <code>document.write</code> fail in cases where they span multiple
+<code>script</code> tags.
+An example is:
+<pre class="prettyprint">
+<script>document.write('<div>')</script>
+<span></span>
+<script>document.write('</div>')</script>
+</pre>
+Without defer_javascript the <code>span</code> would have been
+created inside the <code>div</code>. With defer_javascript
+the <code>span</code> would have been created outside and after the
+<code>div</code>.
+</p>
+<p>
+Any <code>document.body.appendChild</code> calls will always get appended to
+the bottom of the page.
+</p>
+<h2>Requirements</h2>
+<p>
+defer_javascript is supported for browser versions of chrome 15+,
+safari5+, Firefox3.6+ and IE9+. For other user agents the filter is turned
+off automatically.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered high risk. JavaScript whose logic depends on the state
+of the DOM may behave differently when defer_javascript is turned
+on.
+</p>
+<p>
+If JavaScript is written to expect user actions before the page is loaded
+completely, such scripts will behave differently with
+defer_javascript. For example, if an <code>alert</code> is placed
+at the start of the page, then with defer_javascript the
+<code>alert</code> would appear only after the page is loaded completely.
+</p>
+<p>
+User actions that trigger events such as <code>onclick</code>
+<code>onkeypress</code> will not be handled until the page is rendered
+completely.
+</p>
+<p>
+Content in the page will reflow if visible elements are inserted in the page by
+JavaScript.
+</p>
+<p>
+The <code>data-pagespeed-no-defer</code> attribute can change the order of script
+execution because those scripts using it are executed inline while those not
+using it are deferred. This can cause errors if these scripts depend on each other
+in any way.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
+
diff --git a/doc/filter-js-inline.html b/doc/filter-js-inline.html
new file mode 100644
index 0000000..81caa2b
--- /dev/null
+++ b/doc/filter-js-inline.html
@@ -0,0 +1,168 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Inline JavaScript</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Inline JavaScript</h1>
+
+
+<h2>Configuration</h2>
+<p>
+The 'Inline JavaScript' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters inline_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters inline_javascript;</pre>
+</dl>
+<p>
+in the configuration file.
+<p>When this filter is enabled, you may also enable the following setting:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedJsInlineMaxBytes bytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed JsInlineMaxBytes bytes;</pre>
+</dl>
+<p>
+This is the maximum size in bytes of any JavaScript file that will be inlined.
+</p>
+
+<h2>Description</h2>
+<p>
+The "Inline JavaScript" filter reduces the number of requests made by a web
+page by inserting the contents of small external JavaScript resources directly
+into the HTML document. This can reduce the time it takes to display
+content to the user, especially in older browsers.
+</p>
+
+<h2>Operation</h2>
+<p>
+When the 'Inline JavaScript' filter is enabled, The contents of small
+external JavaScript resources are written directly into the HTML document;
+therefore, the browser does not request those JavaScript resources.
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script type="text/javascript" src="small.js"></script>
+ </head>
+ <body>
+ <div>
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+And the resource <code>small.js</code> is like this:
+<pre class="prettyprint">
+ /* contents of a small JavaScript file */
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script type="text/javascript">
+ /* contents of a small JavaScript file */
+ </script>
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+This eliminates the external request for <code>small.js</code> by placing
+it inline in the HTML document.
+</p>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/inline_javascript.html?ModPagespeed=on&ModPagespeedFilters=inline_javascript">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+There is a tradeoff here between requests and cacheability: including the
+JavaScript directly in the HTML avoids making an additional request to the
+external JavaScript resource, but if the JavaScript file is large (and doesn't
+change often), it may be better to keep it separate from the HTML so that it
+can be cached by the browser. Thus, the Inline JavaScript filter will only
+inline JavaScript files below a certain size threshold, which can be adjusted
+using the <code>JsInlineMaxBytes</code> directive.
+</p>
+<p>
+If a <code><script></code> tag contains both a
+<code>src attribute </code><strong>AND</strong> <code>inline contents</code>,
+the browser will load the external script at the src URL and will not execute
+the inline contents; however, the inline contents will still remain invisibly
+in the DOM. Some pages take advantage of this and place arbitrary data inline
+within the <code><script></code> tag to be picked up by the external
+script referenced by the <code>src</code> attribute. To avoid breaking
+such pages, the Inline JavaScript filter
+will not inline any script for which there are any non-whitespace characters
+between the <code><script></code> and <code><script></code> tags.
+</p>
+<p>
+To avoid opening up cross-domain scripting vulnerabilities, the Inline
+Javscript filter will only inline an external JavaScript file if it is being
+served from the same domain as the HTML file into which it is to be inlined.
+</p>
+
+<h2>Risks</h2>
+<p>
+JavaScript inlining is low to moderate risk. It should be safe for most pages,
+but it may break scripts that walk the DOM looking for and examining their own
+<code><script></code> tag (or other <code><script></code> tags).
+As described above, the filter will refuse to inline
+<code><script></code> tags that contain both <code>src</code>
+attributes and inline data; this is a trade-off that should avoid the most
+common cases of this, but one should be
+be aware that there may be other cases that will be broken by this filter.
+</p>
+
+<p>
+ This filter is sensitive to <a href="restricting_urls#aris"><code
+ >AvoidRenamingIntrospectiveJavascript</code></a>. For example,
+ a JavaScript file that
+ calls <code>document.getElementsByTagName('script')</code> will not be
+ inlined.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-js-minify.html b/doc/filter-js-minify.html
new file mode 100644
index 0000000..1f07248
--- /dev/null
+++ b/doc/filter-js-minify.html
@@ -0,0 +1,206 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Minify JavaScript</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Minify JavaScript</h1>
+<h2>Configuration</h2>
+<p>
+The 'Minify JavaScript' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_javascript;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+<p class="note"><strong>Note: New feature as of 1.9.32.1</strong></p>
+<p>
+ <code>rewrite_javascript</code> is equivalent to enabling both
+ <code>rewrite_javascript_inline</code> and
+ <code>rewrite_javascript_external</code>. The former rewrites only
+ inline scripts, and the latter rewrites only external ones.
+</p>
+
+<h3 id="new-minifier">New Minification Parser</h3>
+<p>
+ We introduced a new minification parser in version 1.8.31.2 that
+ improves on some of the shortcomings of the previous parser
+ (for example, correct tokenizing of regular expressions). As of 1.10.33.0,
+ the new parser is used by default, but you can revert back to the old
+ parser with this configuration flag:
+</p>
+<dl>
+ <dt>Apache<dd><pre class="prettyprint"
+ >ModPagespeedUseExperimentalJsMinifier off</pre>
+ <dt>Nginx<dd><pre class="prettyprint"
+ >pagespeed UseExperimentalJsMinifier off;</pre>
+</dl>
+<p>
+ Before 1.10.33.0, the old minification parser was
+ used by default. You can enable the new minification parser with:
+</p>
+<dl>
+ <dt>Apache<dd><pre class="prettyprint"
+ >ModPagespeedUseExperimentalJsMinifier on</pre>
+ <dt>Nginx<dd><pre class="prettyprint"
+ >pagespeed UseExperimentalJsMinifier on;</pre>
+</dl>
+<p>
+ If you have configured any custom javascript libraries
+ for <a href="filter-canonicalize-js">canonicalization</a> you'll have to
+ regenerate your signatures with both <code>--use_experimental_minifier</code>
+ (for the new minifier) and <code>--nouse_experimental_minifier</code>
+ (for the old minifier) flags.
+</p>
+<h2>Description</h2>
+<p>
+This filter minifies JavaScript code, using an algorithm similar to that in
+Douglas Crockford's popular
+<a href="http://www.crockford.com/javascript/jsmin.html">JSMin</a> program.
+At present, the filter strips all
+comments and most whitespace. The filter works only on JavaScript found in
+<code><script></code> blocks (either as the target of the
+<code>src</code> attribute, or within the body of the block).
+</p>
+<p>
+Minification can drastically reduce the byte count in common JavaScript code.
+This filter can be used to avoid the extra step of minifying Java code by hand
+when constructing and maintaining a site.
+</p>
+<p>
+This <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload#MinifyJS">practice</a>
+reduces the payload size.
+</p>
+
+<h2>Operation</h2>
+<p>
+The 'Minify JavaScript' filter removes unnecessary bytes on the wire. While it's
+great to put comments, tabs and whitespace in code to improve readability and
+maintenance, these are bytes that take up space on the wire and that a browser's
+JavaScript parser has to parse unnecessarily.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <script>
+ // This comment will be removed
+ document.write("Howdy");
+ state = 1
+ </script>
+ <script src="extScript.js" type="text/javascript">
+ </script>
+ <script src="extScript1.js">
+ /* Note that the contents of a script block aren't altered
+ if a src is specified. It is assumed the code will be
+ using the script block contents as data. */
+ document.write("Internal script; state = " + state);
+ state = 42
+ </script>
+ </body>
+</html>
+</pre>
+<p>
+With the following in <code>extScript.js</code>:
+<pre class="prettyprint">
+ /* Inject state into document */
+ document.write("External " + state);
+ state += 1; // Then update it.
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <script>document.write("Howdy");state=1</script>
+ <script src=".../extScript.js.pagespeed.jm.HASH.js"></script>
+ <script src=".../extScript1.js.pagespeed.jm.HASH.js" type="text/javascript">
+ /* Note that the contents of a script block aren't altered
+ if a src is specified. It is assumed the code will be
+ using the script block contents as data. */
+ document.write("Internal script; state = " + state);
+ state = 42
+ </script>
+ </body>
+</html>
+</pre>
+<p>
+And the rewritten file <code>extScript.js.pagespeed.jm.HASH.js</code> will
+contain:
+<pre class="prettyprint">
+document.write("External "+state);state+=1;
+</pre>
+</p>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/rewrite_javascript.html?ModPagespeed=on&ModPagespeedFilters=rewrite_javascript">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+Only JavaScript code referenced by <code><script></code> tags is
+rewritten. Code fragments that occur elsewhere (for example event handler
+declarations in CSS) are not altered.
+</p>
+
+<h2>Risks</h2>
+<p>
+Some JavaScript code depends upon the formatting of scripts in the page. For
+example, scripts exist that store data in JavaScript comments, then walk the
+DOM, retrieve the source code for the script, and read the data from the
+comments. This will not work in conjunction with any minification tool.
+Authors are encouraged instead to store data either in the body of a
+script with a <code>src</code> (as shown in the example above), in hidden
+<code><div></code> or <code><span></code> elements in the
+page itself, or best of all in JavaScript string constants.
+</p>
+
+<p>
+ This filter is sensitive to <a href="restricting_urls#aris"><code
+ >AvoidRenamingIntrospectiveJavascript</code></a>. For example, a
+ JavaScript file that calls
+ <code>document.getElementsByTagName('script')</code> will not be rewritten.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-js-outline.html b/doc/filter-js-outline.html
new file mode 100644
index 0000000..6116f5e
--- /dev/null
+++ b/doc/filter-js-outline.html
@@ -0,0 +1,167 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Outline JavaScript</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Outline JavaScript</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Outline JavaScript' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters outline_javascript</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters outline_javascript;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+This filter is an <strong>experimental</strong> filter which takes inline
+JavaScript and puts it in an external resource.
+</p>
+
+<h2>Operation</h2>
+<p>
+The 'Outline JavaScript' filter outlines all JavaScript that is larger
+than a minimum threshold in bytes.
+The threshold can be set by adding/changing the line:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedJsOutlineMinBytes 3000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed JsOutlineMinBytes 3000;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script type="text/javascript">
+ ...
+ </script>
+ </head>
+ <body>
+ <div>
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <script type="text/javascript" src="_.pagespeed.jo.tXBSxcB8mn.js"></script>
+ </head>
+ <body>
+ <div class="blue yellow big bold">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+And the new JavaScript file (<code>_.pagespeed.jo.tXBSxcB8mn.js</code>) will be:
+<pre class="prettyprint">
+ ...
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/outline_javascript.html?ModPagespeed=on&ModPagespeedFilters=outline_javascript">example</a>.
+</p>
+
+<h2>Pros and Cons</h2>
+<p>
+This could be advantageous if:
+</p>
+<ol>
+ <li>The JavaScript does not change much but the HTML does,
+ then we can cache the JavaScript.</li>
+ <li>when many web pages share the same inlined JavaScript, it will
+ be outlined to a consistent name and thus will be cached more.</li>
+ <li>The inline JavaScript is very long, in which case, outlining it
+ will cause it to be loaded in parallel with the HTML doc.</li>
+</ol>
+<p>
+However, for some websites it will be dis-advantageous because it will:
+</p>
+<ol>
+ <li>create an extra HTTP request and</li>
+ <li>tie up one of the connections to this domain, which could have been
+ used to fetch the actually cacheable external resources.</li>
+</ol>
+
+<h2>Requirements</h2>
+<p>
+Outline filters can currently only run on single-server environments
+because the resource can only be fetched from a server after that server
+has rewritten the HTML page. If a different server rewrote the HTML page,
+then this sever will not have the information needed to create the resource.
+This could be by a network database shared between servers.
+</p>
+<p>
+The 'Outline JavaScript' filter may need to <em>"absolutify"</em> relative
+URLs, if it is outlined to a different directory than the original HTML.
+</p>
+<p>
+The 'Outline JavaScript' filter will maintain the order of the script
+blocks, as script order can be significant.
+</p>
+
+<h2>Risks</h2>
+<p>
+The 'Outline JavaScript' filter is considered low risk. However, JavaScript
+can be written that walks the DOM looking for <code><script></code> tags
+with certain syntax. Such JavaScript may behave differently on a page
+which has changed <code><script></code> tags in this way.
+</p>
+<p>
+Additionally, JavaScript can construct requests in arbitrarily complex
+ways, so the filter may not be able to <em>absolutify</em> all relative URL
+references, which could cause incorrect sub-resource requests.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-lazyload-images.html b/doc/filter-lazyload-images.html
new file mode 100644
index 0000000..596c152
--- /dev/null
+++ b/doc/filter-lazyload-images.html
@@ -0,0 +1,180 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Lazyload Images</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Lazyload Images</h1>
+<h2>Configuration</h2>
+<p>
+The 'Lazyload Images' filter is enabled by specifying
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters lazyload_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters lazyload_images;</pre>
+</dl>
+in the configuration file.
+
+<h2>Objective</h2>
+<p>
+Optimize browser rendering and reduce number of HTTP round-trips by deferring
+the loading of images which are not in the client's viewport. This filter
+implements the PageSpeed rules for <a
+ target="_blank" href="https://developers.google.com/speed/docs/best-practices/rendering" target="_blank">optimizing browser
+ rendering</a> and <a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt" target="_blank">minimizing round
+ trip times</a>.
+</a>
+</p>
+
+<h2>Description</h2>
+<p>
+The lazyload_images filter defers loading of images until they
+become visible in the client's viewport or the page's <code>onload</code>
+event fires. This avoids blocking the download of other critical resources
+necessary for rendering the above the fold section of the page.
+</p>
+<p>
+The filter changes the <code>src</code> attributes of <code><img></code>
+elements on each HTML page to <code>data-pagespeed-lazy-src</code>. It attaches
+an <code>onload</code> handler to these elements to determine whether the
+element is in the client's viewport, and if so, loads it. It also attaches an
+<code>onscroll</code> handler to the page, so that elements below the fold
+are loaded when they become visible in the client's viewport as the user
+scrolls down the page.
+</p>
+
+
+<h2 id="lazyload-after-onload">Lazyload After Onload</h2>
+<p>
+Additionally, in 1.8.31.2 and later, all images on the page that haven't yet
+been loaded will be forcefully loaded after the page's <code>onload</code> event
+is fired. This reduces jank when scrolling the page, especially on mobile
+devices, at the cost of downloading bytes for images that may never be displayed
+to the user.
+</p>
+<p>
+To disable loading of images on page <code>onload</code>, set:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedLazyloadImagesAfterOnload off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed LazyloadImagesAfterOnload off;</pre>
+</dl>
+
+<h2 id="lazyload-blank-url">Blank Url</h2>
+<p>
+By default, when the page is initially viewed, a 1x1 blank image is served from
+<a href="configuration#pagespeed_static">pagespeed_static</a>. It is also
+possible to use the same image served by Google's network, or any image that you
+choose, by specifying:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedLazyloadImagesBlankUrl "https://www.gstatic.com/psa/static/1.gif"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed LazyloadImagesBlankUrl "https://www.gstatic.com/psa/static/1.gif";</pre>
+</dl>
+<p>An advantage of this approach is that this gif may already be in
+the browser cache since any PageSpeed-enabled site can share it.
+However, this would send traffic to Google with your page as the
+Referer.
+</p>
+
+<p>
+ These directives can be used in
+ <a href="configuration#htaccess">location-specific configuration
+ sections</a>.
+</p>
+
+<h2 id="pagespeed_no_defer">Disabling Lazyloading Per-image</h2>
+<p>
+lazyload_images doesn't defer an <code>img</code> tag if it has
+the <code>data-pagespeed-no-defer</code> attribute (preferred) or <code>pagespeed_no_defer</code>
+attribute (deprecated). Usage:
+<pre class="prettyprint">
+<img data-pagespeed-no-defer src=.../>
+</pre>
+</p>
+
+<h2 id="ua-blacklist">User-Agent Blacklist</h2>
+<p>
+To ensure images are only lazyloaded in supported browsers, lazyload_images
+uses a User Agent blacklist. Browsers that will not see images loaded lazily
+are:
+<ul>
+ <li>BlackBerry 5.0 and older</li>
+ <li>The Google
+ Plus <a href="https://developers.google.com/+/web/snippet/">thumbnail
+ fetcher</a></li>
+ <li>Web Spiders
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/kernel/http/bot_checker.gperf">full
+ list</a>)</li>
+</ul>
+</p>
+
+<h2 id="beacons">Lazily loading only images below the fold</h2>
+<p>
+By default lazyload_images injects JavaScript that uses
+a <a href="faq#beacons">beacon</a> to report back to the server the images that
+are visible in the client's initial viewport (<em>above the fold</em>).
+It takes a few accesses of a page for the data to be reported back and
+processed but eventually the above-the-fold images will be known and will be
+loaded immediately while all the other below-the-fold images will be lazily
+loaded; until then all images are lazily loaded.
+</p>
+<p>
+The use of beacons can be disabled using the
+<a href="config_filters#beacons">ModPagespeedCriticalImagesBeaconEnabled</a>
+directive. If they are disabled, lazyload_images will not inject the
+JavaScript and will revert to lazily loading all images.
+</p>
+
+<h2>Example</h2>
+<p>
+The effect of this filter can be observed by comparing the
+number of requests <a
+ href="https://www.modpagespeed.com/examples/lazyload_images.html?ModPagespeed=off">
+ before</a>
+and <a
+ href="https://www.modpagespeed.com/examples/lazyload_images.html?ModPagespeed=on&ModPagespeedFilters=lazyload_images">
+ after</a> rewriting.
+As you scroll down, you will notice that images below the fold are only
+requested after they become visible in the viewport.
+</p>
+
+<h2>Risks</h2>
+<p>
+The computation of each image's position in the viewport may consume
+additional CPU cycles on the client side. Sites that employ
+JavaScript libraries to implement lazy-loading may not work properly
+with this mechanism.</p>
+
+</div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
+
diff --git a/doc/filter-local-storage-cache.html b/doc/filter-local-storage-cache.html
new file mode 100644
index 0000000..5dc0fcf
--- /dev/null
+++ b/doc/filter-local-storage-cache.html
@@ -0,0 +1,149 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Local Storage Cache</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Local Storage Cache</h1>
+
+<h2>Configuration</h2>
+
+<p>
+The 'Local Storage Cache' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters local_storage_cache</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters local_storage_cache;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+
+<p>
+This filter saves inlined resources to the browser's local storage (an HTML5
+feature) on the first view of a page, and loads them from local storage on
+subsequent views rather than sending them (inline) again.
+</p>
+
+<p>
+This benefits first views by inlining resources <em>and</em> benefits repeat
+views by caching these resources - normally inlining would hurt repeat views
+because inlined resources need to be sent every time since they're not in the
+browser's cache.
+</p>
+
+<h2>Operation</h2>
+
+<p>
+This filter does the following:
+<ul>
+<li>It adds JavaScript utility functions to the rewritten HTML's
+ <code>head</code> section.</li>
+<li>For each inlined CSS or image resource that the browser doesn't yet have
+ in local storage, it inlines the resource and tags it with new special
+ attributes.</li>
+<li>For each inlined CSS or image resource that the browser does have in local
+ storage, it replaces the resource with a JavaScript snippet that loads the
+ resource from local storage.</li>
+<li>Finally, it adds an <code>onload</code> handler that processes each
+ tagged inlined resource.
+</ul>
+</p>
+
+<p>
+The filter determines which resources are in local storage by inspecting a
+browser cookie set by the last step's <code>onload</code> handler. The cookie's
+name is <code>_GPSLSC</code> and its value is a list of hashes of the URLs of
+resources stored in local storage.
+</p>
+
+<p>
+Inlined JavaScript is not saved in local storage because it's not possible to
+reliably load it from local storage and execute it such that the behavior is
+the same as when it is inlined.
+</p>
+
+<p>
+The attributes added to inlined resources are:
+</p>
+<ul>
+<li><code>data-pagespeed-lsc-expiry</code>: when the resource expires. If the
+ resource is accessed after its expiry it won't be used and will be removed
+ from the cookie.</li>
+<li><code>data-pagespeed-lsc-hash</code>: a hash of the resource's URL (before
+ inlining). This is used to represent the resource in a short form and is saved
+ in the cookie.</li>
+<li><code>data-pagespeed-lsc-url</code>: the resource's URL. This is used by the
+ JavaScript snippet to request the resource directly if the resource's hash is
+ in the cookie but the resource isn't found in local storage.</li>
+</ul>
+
+<h3>Online Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/local_storage_cache.html?ModPagespeed=on&ModPagespeedFilters=local_storage_cache,inline_css,inline_images">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+The <a href="filter-css-inline">Inline CSS</a> and/or <a
+href="filter-js-inline">Inline JavaScript</a> filters must be enabled for this
+filter to have any effect.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered moderate-to-high risk: it adds a payload overhead
+of extra JavaScript, it adds a payload overhead of extra attributes on each
+inlined resource, and it adds the execution overhead of its <code>onload</code>
+handler.
+</p>
+<p>
+This filter is experimental. Its performance benefit has not been extensively
+tested and we are seeking feedback on its usefulness and benefits. It can
+only speed up repeat views of a page or uses of saved resources by other pages,
+it cannot speed up first views.
+</p>
+<p>
+This filter sets a cookie for the domain of the page being rewritten.
+</p>
+
+<p class="note"><strong>Note:</strong>
+This filter requires the browser to support local storage, an HTML5 feature not
+implemented by all browsers, in particular older browsers. Browsers that don't
+support local storage will work as if this filter wasn't enabled: although the
+payload and <code>onload</code> overheads will be incurred, the cookie will
+never be set so no benefits will be obtained.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-make-google-analytics-async.html b/doc/filter-make-google-analytics-async.html
new file mode 100644
index 0000000..0a6aba8
--- /dev/null
+++ b/doc/filter-make-google-analytics-async.html
@@ -0,0 +1,171 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Make Google Analytics Asynchronous</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Make Google Analytics Asynchronous</h1>
+
+
+<h2>Configuration</h2>
+<p>
+ The 'Make Google Analytics Asynchronous' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters make_google_analytics_async</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters make_google_analytics_async;</pre>
+</dl>
+ in the configuration file.
+</p>
+
+
+<h2>Description</h2>
+<p>
+ The filter rewrites pages that load the
+ <a href="http://www.google.com/analytics/">Google Analytics</a>
+ tracking code synchronously to load it asynchronously instead.
+ Loading Google Analytics asynchronously has the advantage that it
+ will not block resources that load later in the page.
+</p>
+<p>
+ Currently, the filter only changes the loading mechanism. To get the
+ full benefit of the asynchronous load, you should move the loading of
+ the tracking code to the bottom of the <code><head></code> of
+ the page. That allows beacons to be sent earlier during the page load --
+ and avoids missing them if a user navigates away from a page quickly.
+ For more information on how to manually upgrade, see
+ <a href="/analytics/devguides/collection/gajs/asyncMigrationExamples#migrationInstructions">Migrating to Async Tracking</a>
+</p>
+
+
+<h2>Operation</h2>
+<p>
+ The filter looks for a Google Analytics snippet such as the following:
+</p>
+<pre class="prettyprint">
+<script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src=" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-XXXXX-X");
+ pageTracker._trackPageview();
+ } catch(err) {}
+</script>
+</pre>
+<p>
+ and rewrites such snippets in-place to:
+</p>
+<pre class="prettyprint">
+<script type='text/javascript'>
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ <strong>GLUE_SCRIPT</strong>
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
+ 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+</script>
+<script type="text/javascript">
+ try {
+ var pageTracker = _modpagespeed_getRewriteTracker("UA-XXXXX-X");
+ pageTracker._trackPageview();
+ } catch(err) {}
+</script>
+</pre>
+<p>
+ where <strong><code>GLUE_SCRIPT</code></strong> is JavaScript that
+ defines the <code>_modpagespeed_getRewriteTracker</code> function to
+ return an object that maps all the methods of the synchronous API to
+ the asynchronous API.
+</p>
+
+<p>
+ Additionally, the filter will replace loads in the following format:
+</p>
+<pre class="prettyprint">
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
+</pre>
+<p>
+ The rewrite is known to not work when calls are made to Google
+ Analytics methods that return values. To avoid this issue, the
+ filter searches for these methods and abandons the rewrite if
+ they are found.
+</p>
+
+
+<h3>Example</h3>
+<p>
+ You can see the filter in action at <code>www.modpagespeed.com</code> on this
+ <a href="https://www.modpagespeed.com/examples/make_google_analytics_async.html?ModPagespeed=on&ModPagespeedFilters=make_google_analytics_async">example</a>.
+</p>
+
+
+<h2>Requirements</h2>
+<p>
+ In order for the filter to trigger, the Google Analytics snippets
+ must be in the same format as shown above. The filter only performs
+ simple string matches to find the Google Analytics snippets.
+</p>
+
+<p>
+ Also, once a synchronous load is matched, the rest of the page is scanned for
+ any Google Analytics calls that return values. It only performs the rewrite
+ once it has reached the end of the page. That means the filter depends on how
+ the web page is buffered by the server. Specifically, if the snippet is not
+ in the last flush window, it will not be rewritten.
+</p>
+
+
+<h2>Risks</h2>
+<p>
+ This filter is considered high risk.
+</p>
+<p>
+ The <code>make_google_analytics_async</code> filter is experimental
+ and has not had extensive real-world testing. One case where a rewrite
+ would cause errors is if the filter misses calls to Google Analytics
+ methods that return values. If such methods are found, the rewrite is
+ skipped. However, the disqualifying methods will be missed if they
+ <ul style="margin-bottom: .5em">
+ <li>come before the load,</li>
+ <li>are in attributes such as "onclick",</li>
+ <li>or if they are in external resources.</li>
+ </ul>
+ Those cases are expected to be rare.
+</p>
+
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-make-show-ads-async.html b/doc/filter-make-show-ads-async.html
new file mode 100644
index 0000000..06e3d75
--- /dev/null
+++ b/doc/filter-make-show-ads-async.html
@@ -0,0 +1,164 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Make Show Ads Asynchronous</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Make Show Ads Asynchronous</h1>
+
+<p class="note"><strong>Note: New feature as of 1.10.33.0.</strong></p>
+<h2>Configuration</h2>
+<p>
+ The 'Make Show Ads Asynchronous' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters make_show_ads_async</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters make_show_ads_async;</pre>
+</dl>
+ in the configuration file.
+</p>
+
+
+<h2>Description</h2>
+<p>
+ The filter rewrites pages that load
+ <a href="https://www.google.com/adsense">Google AdSense</a> ads with the
+ synchronous <code>show_ads.js</code> snippet to load them with the
+ asynchronous <code>adsbygoogle.js</code> instead.
+ Loading AdSense asynchronously
+ helps keep ads
+ from <a href="http://googledevelopers.blogspot.com/2013/07/an-async-script-for-adsense-tagging.html">delaying
+ the rest of the page content</a>.
+</p>
+
+<h2>Operation</h2>
+<p>
+ The filter looks for a Google AdSense snippet such as the following:
+</p>
+<pre class="prettyprint">
+<div style="border: 2px solid blue;">
+ <script>
+ google_ad_client = "ca-google";
+ google_ad_width = 728;
+ google_ad_height = 90;
+ google_ad_format = "728x90";
+ google_adtest = "on";
+ google_ad_type = "text";
+ </script>
+ <script type="text/javascript"
+ src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+ </script>
+</div>
+<div style="border: 2px solid blue;">
+ <script>
+ google_ad_client = "ca-google";
+ google_ad_width = 728;
+ google_ad_height = 90;
+ google_ad_format = "728x90";
+ google_adtest = "on";
+ google_ad_type = "text";
+ </script>
+ <script type="text/javascript"
+ src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+ </script>
+</div>
+</pre>
+<p>
+ and rewrites such snippets in-place to:
+</p>
+<pre class="prettyprint">
+<div style="border: 2px solid blue;">
+ <script async
+ src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
+ </script>
+ <ins
+ class="adsbygoogle"
+ style="display:inline-block;width:728px;height:90px"
+ data-ad-client="ca-google"
+ data-ad-format="728x90"
+ data-ad-type="text"
+ data-adtest="on">
+ </ins>
+ <script>(adsbygoogle = window.adsbygoogle || []).push({})
+ </script>
+</div>
+<div style="border: 2px solid blue;">
+ <ins
+ class="adsbygoogle"
+ style="display:inline-block;width:728px;height:90px"
+ data-ad-client="ca-google"
+ data-ad-format="728x90"
+ data-ad-type="text"
+ data-adtest="on">
+ </ins>
+ <script>(adsbygoogle = window.adsbygoogle || []).push({})
+ </script>
+</div>
+</pre>
+
+<h3>Example</h3>
+<p>
+ You can see the filter in action at <code>www.modpagespeed.com</code> on this
+ <a href="https://www.modpagespeed.com/examples/make_show_ads_async.html?ModPagespeed=on&ModPagespeedFilters=make_show_ads_async">example</a>.
+</p>
+
+
+<h2>Requirements</h2>
+<p>
+ This filter requires that ads specify a specific width and height
+ with <code>google_ad_width</code> and <code>google_ad_height</code>.
+</p>
+<p>
+ If <code>google_ad_output</code> is specified it must be set
+ to <code>html</code>. Alternate outputs like <code>js</code>
+ or <code>json_html</code> are not supported by <code>adsbygoogle.js</code>.
+</p>
+<p>
+ Ad snippets that don't meet these requirements won't be rewritten. Other ad
+ blocks on the same page will still be rewritten, loading
+ both <code>show_ads.js</code> and <code>adsbygoogle.js</code>. To avoid this,
+ we recommend not enabling this filter for pages that have a mixture of
+ eligible and ineligible ad blocks.
+</p>
+
+<h2>Risks</h2>
+<p>
+ This filter is considered high risk.
+</p>
+<p>
+ The <code>make_show_ads_async</code> filter is experimental and has not had
+ extensive real-world testing. It manipulates JavaScript, which is always
+ risky, and if errors keep ads from displaying that could mean lost revenue for
+ your site.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-pedantic.html b/doc/filter-pedantic.html
new file mode 100644
index 0000000..d9495cb
--- /dev/null
+++ b/doc/filter-pedantic.html
@@ -0,0 +1,92 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Pedantic</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Pedantic</h1>
+<h2>Configuration</h2>
+<p>
+The 'Pedantic' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters pedantic</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters pedantic;</pre>
+</dl>
+<p>
+in the configuration file.
+
+<h2>Description</h2>
+<p>
+The 'Pedantic' filter is used to make PageSpeed more HTML4 compliant. Some
+filters remove type attributes in style and script tags, which are
+required for HTML4 validation checks but not HTML5. This filter adds default
+types to script and style tags. Note that it will increase HTML size and thus
+possibly increase latency so use it only if you require HTML4 validation.
+</p>
+
+<h2>Operation</h2>
+<p>
+There are two cases where a <code>type</code> attribute can be added. First, if
+a <code><style></code> tag does not have a <code>type</code> attribute
+then a <code>type="text/css"</code> attribute will be added to
+the <code>style</code> tag. Second, if a <code><script></code> tag does
+not have a <code>type</code> attribute then
+a <code>type="text/javascript"</code> attribute will be added to
+the <code>script</code> tag.
+</p>
+<p>
+The expected method of using the pedantic filter is via a query parameter
+such as: '<code>?ModPagespeedFilters=+pedantic</code>'.
+</p>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on
+this <a
+href="https://www.modpagespeed.com/examples/pedantic.html?ModPagespeed=on&ModPagespeedFilters=pedantic"
+>example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+The 'Pedantic' filter will not alter a page with an HTML5 DOCTYPE.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered medium risk. It is safe for most pages, but could
+possibly break scripts by adding <code>text/javascript</code> to a tag if the
+default mime type is something other than <code>text/javascript</code>.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
+
+
diff --git a/doc/filter-prioritize-critical-css.html b/doc/filter-prioritize-critical-css.html
new file mode 100644
index 0000000..ce064bd
--- /dev/null
+++ b/doc/filter-prioritize-critical-css.html
@@ -0,0 +1,178 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Prioritize Critical CSS</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Prioritize Critical CSS</h1>
+ <h2>Configuration</h2>
+ <p>
+ The 'Prioritize Critical CSS' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters prioritize_critical_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters prioritize_critical_css;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Objective</h2>
+<p>
+This rewriter improves page render times by identifying CSS rules needed to
+render the page, inlining those critical rules and deferring the load of the
+full CSS resources.
+</p>
+
+<h2>Description</h2>
+<p>
+prioritize_critical_css parses the CSS and replaces it with inlined CSS
+that contains only the rules used on the page. This avoids any blocking CSS
+requests needed for the initial render. It also collects all CSS tags and
+appends them to the HTML in the same order they were found. This will make
+all style rules available after page load.
+</p>
+<p>
+Deferring style rules that are not used by the document delays downloading
+unnecessary bytes and allows the browser to start rendering sooner per
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload#RemoveUnusedCSS">this best
+practice</a>.
+</p>
+
+<h2>Example</h2>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <link rel="stylesheet" href="small.css">
+ </head>
+ <body>
+ <div class="blue">
+ Hello, world!
+ </div>
+ </body>
+</html>
+</pre>
+<p>
+And the resource <code>small.css</code> is like this:
+<pre class="prettyprint">
+ .yellow {background-color: yellow;}
+ .blue {color: blue;}
+ .big { font-size: 8em; }
+ .bold { font-weight: bold; }
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <style>
+ .blue{color:blue;}
+ </style>
+ </head>
+ <body>
+ <div class="blue">
+ Hello, world!
+ </div>
+ </body>
+</html>
+<noscript><link rel="stylesheet" href="small.css"></noscript>
+</pre>
+<p>
+The original small.css is loaded after onload of the page. The application
+order of CSS rules is maintained by injecting all the <code><style></code>
+and <code><link></code> elements into the document through JavaScript.
+</p>
+
+<p>
+The effect of this rewriter can be observed on modpagespeed.com <a
+ href="https://www.modpagespeed.com/examples/prioritize_critical_css.html?ModPagespeed=off">
+ before</a> and <a
+ href="http://modpagespeed.com/prioritize_critical_css.html?ModPagespeedFilters=+prioritize_critical_css">
+ after</a> rewriting. You will need to reload the page a few times to see the
+effect, since this rewriter computes the critical rules for the page based on
+previous page renders.
+</p>
+
+<p>
+prioritize_critical_css injects JavaScript that uses a
+<a href="faq#beacons">beacon</a> to report back to the server the CSS that is
+used by the page. It takes at least two visits to instrument the page, collect
+the appropriate beacon data, and extract the required CSS before a fully
+optimized page is presented; until then all CSS is optimized as normal:
+minified, combined, etc.
+</p>
+<p>
+prioritize_critical_css automatically enables the
+<a href="filter-css-rewrite"><code>rewrite_css</code></a>,
+<a href="filter-css-inline-import"><code>inline_import_to_link</code></a>, and
+<a href="filter-flatten-css-imports"><code>flatten_css_imports</code></a>
+filters since it needs these to be applied to
+determine the critical CSS, and it automatically disables the
+<code>inline_css</code> filter as it does this itself. It does this even if
+these other filters are expressly disabled (or enabled in the case of
+<code>inline_css</code>) but <em>not</em> if they are expressly forbidden (in
+which case this filter will do the instrumentation work but ultimately fail to
+completely optimize the page, wasting processing time).
+</p>
+
+<h2>Requirements</h2>
+<p>
+prioritize_critical_css computes critical CSS only if the corresponding
+CSS file is "public" cacheable.
+</p>
+
+<h2>Risks</h2>
+<p>
+prioritize_critical_css filter is moderate risk. It should be safe for
+most pages, but it could potentially cause reflow of the page. If different
+content (with substantially different styles) is served for the same URL based
+on cookies, IP, user agent, etc., then this filter could potentially show
+unstyled content before it loads the page completely, or in certain cases it
+could break rendering completely.
+</p>
+<p>
+prioritize_critical_css filter adds inlined CSS to the HTML, increasing
+its size. The overhead of the extra inlined CSS can outweigh the benefit if
+the CSS resources are already in the browser's cache. However it will still
+benefit from faster processing of the CSS in the browser.
+</p>
+
+<h2>Limitations</h2>
+<p>
+This rewriter cannot compute critical CSS for CSS files under IE conditional
+comments and is disabled if it detects an IE user agent.
+</p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-quote-remove.html b/doc/filter-quote-remove.html
new file mode 100644
index 0000000..7846670
--- /dev/null
+++ b/doc/filter-quote-remove.html
@@ -0,0 +1,109 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Remove Quotes</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Remove Quotes</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Remove Quotes' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters remove_quotes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters remove_quotes;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+The quote removal filter eliminates unnecessary quotation marks
+(either <code>""</code> or <code>''</code>) from HTML attributes. While
+required by the various HTML specifications, browsers permit their omission when
+the value of an attribute is composed of a certain subset of characters
+(alphanumerics and some punctuation characters).
+</p>
+<p>
+Quote removal produces a modest savings in byte count on most pages. It may
+also benefit gzip compression by canonicalizing the textual representation of
+name=value pairs.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <img src="BikeCrashIcn.png" align='left' alt="" border="0" width='70' height='30' >
+ </body>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ </head>
+ <body>
+ <img src=BikeCrashIcn.png align=left alt="" border=0 width=70 height=30 >
+ </body>
+</html>
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/remove_quotes.html?ModPagespeed=on&ModPagespeedFilters=remove_quotes">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+Only previously-quoted attributes are subject to quote removal. Quote
+removal occurs after most rewriting passes, so that any alterations to
+attribute values (such as rewritten URLs) will be correctly accounted
+for. This filter will act as a pass-through when XHTML is detected
+via <code>doctype</code> or <code>content-type</code>.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is low risk. Space savings from the filter may be small (so the
+cost of running the filter may outweigh its benefits in certain settings).
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-rewrite-style-attributes.html b/doc/filter-rewrite-style-attributes.html
new file mode 100644
index 0000000..8b9e6a3
--- /dev/null
+++ b/doc/filter-rewrite-style-attributes.html
@@ -0,0 +1,118 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Rewrite Style Attributes</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Rewrite Style Attributes</h1>
+
+
+
+<h2>Configuration</h2>
+<p>
+The 'Rewrite Style Attributes' filter is enabled by specifying <em>either</em>:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_style_attributes,rewrite_css</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_style_attributes,rewrite_css;</pre>
+</dl>
+or
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_style_attributes_with_url,rewrite_css,rewrite_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_style_attributes_with_url,rewrite_css,rewrite_images;</pre>
+</dl>
+<p>
+in the configuration file. If both are enabled,
+<code>rewrite_style_sttributes</code> takes precedence.
+</p>
+<h2>Description</h2>
+<p>
+The "Rewrite Style Attributes" filter rewrites CSS inside elements' style
+attribute. It requires <code>rewrite_css</code> to also be enabled. See the settings for
+<a href="filter-css-rewrite.html">rewrite_css</a> to control CSS minification, image rewriting,
+image recompression, and cache extension.</p>
+<p>
+<code>rewrite_style_attributes</code> enables the filter for all style
+attributes. <code>rewrite_style_attributes_with_url</code> enables it only
+for style attributes that contain the text '<code>url(</code>', for which you will generally
+want to enable one or more image optimization filters.</p>
+<p>
+<code>rewrite_style_attributes_with_url</code> is more efficient because it
+does not always parse the CSS, but it will not optimize CSS that doesn't
+reference any URLs. <code>rewrite_style_attributes</code> will always parse
+the CSS and optimize everything possible. Because images are generally the
+source for greatest improvement and are enclosed in <code>url()</code>,
+<code>rewrite_style_attributes_with_url</code> is a good balance for most uses,
+while <code>rewrite_style_attributes</code> is available for more aggressive
+optimization.
+</p>
+<h2>Operation</h2>
+<p>
+This filter inspects the style attributes of all tags other than
+<code><style></code> (since they cannot have a style attribute) and
+rewrites them according to the configured <a href="filter-css-rewrite.html"
+>rewrite_css</a> filter, which can include CSS minification, image rewriting,
+image recompression, and cache extension.
+</p>
+<p>
+As explained above, if <code>rewrite_style_attributes_with_url</code> is
+enabled the style attribute's contents are first scanned to ensure that they
+contain the text <code>url(</code> and are processed only if so.
+</p>
+<p>
+For example, if a <code><div></code> tag looks like this:
+</p>
+<pre class="prettyprint">
+<div style="background-image: url('images/Puzzle.jpg');"/>
+</pre>
+<p>
+Then, if the image is optimizable, PageSpeed will convert it to something
+like:
+<pre class="prettyprint">
+<div style="background-image:url('images/Puzzle.jpg.pagespeed.ic.7X5cYtoCx-.jpg');"/>
+</pre>
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/rewrite_style_attributes.html?ModPagespeed=on&ModPagespeedFilters=rewrite_style_attributes_with_url,rewrite_css,rewrite_images">example</a>.
+</p>
+
+<h2>Risks</h2>
+<p>
+This filter is considered minimal risk.
+<code>rewrite_style_attributes_with_url</code> is a core filter but
+<code>rewrite_style_attributes</code> is not.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-source-maps-include.html b/doc/filter-source-maps-include.html
new file mode 100644
index 0000000..4c6e344
--- /dev/null
+++ b/doc/filter-source-maps-include.html
@@ -0,0 +1,141 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Include JavaScript Source Maps</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Include JavaScript Source Maps</h1>
+<h2>Configuration</h2>
+<p>
+ The 'Include JavaScript Source Maps' filter is enabled by specifying:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters include_js_source_maps</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters include_js_source_maps;</pre>
+</dl>
+<p>
+ in the configuration file. If you are using a version before 1.10.33.0,
+ you must also enable the
+ <a href="filter-js-minify">new JavaScript minifier</a>:
+</p>
+<dl>
+ <dt>Apache<dd><pre class="prettyprint"
+ >ModPagespeedUseExperimentalJsMinifier on</pre>
+ <dt>Nginx<dd><pre class="prettyprint"
+ >pagespeed UseExperimentalJsMinifier on;</pre>
+</dl>
+
+<h2>Description</h2>
+<p>
+ Source maps are files that tell browsers how to map between a minified
+ JavaScript file and the original, readable version so that you can see the
+ readable version while debugging minified production code. For more
+ information on source maps in general, see Ryan Seddon's
+ <a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/">
+ Introduction to JavaScript Source Maps</a> or the
+ <a href="https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit">
+ specification proposal</a>.
+</p>
+<p>
+ This filter constructs a source map from the minified JavaScript to your
+ original JavaScript files and adds a comment specifying the URL for this
+ source map.
+</p>
+
+<h2>Example</h2>
+<p>
+ For example, if the original JavaScript file looks like this:
+</p>
+<pre class="prettyprint">
+console.log('External script start');
+
+// Browser/window data to report
+var data = { 'User-Agent': navigator.userAgent,
+ 'Platform': navigator.platform,
+ 'Date': window.Date,
+ 'Dimensions': window.outerHeight + 'x' + window.outerWidth
+ };
+
+// Construct HTML list for data.
+var dl = document.createElement('dl');
+for (key in data) {
+ var dt = document.createElement('dt');
+ dt.innerText = key;
+
+ var dd = document.createElement('dd');
+ dd.innerText = data[key];
+
+ dl.appendChild(dt);
+ dl.appendChild(dd);
+}
+
+// Add list to page.
+var content = document.getElementById('content');
+content.appendChild(dl);
+
+console.log('External script finish');
+</pre>
+<p>
+ then the rewritten JavaScript would look like this:
+</p>
+<pre class="prettyprint">
+console.log('External script start');var data={'User-Agent':navigator.userAgent,'Platform':navigator.platform,'Date':window.Date,'Dimensions':window.outerHeight+'x'+window.outerWidth};var dl=document.createElement('dl');for(key in data){var dt=document.createElement('dt');dt.innerText=key;var dd=document.createElement('dd');dd.innerText=data[key];dl.appendChild(dt);dl.appendChild(dd);}var content=document.getElementById('content');content.appendChild(dl);console.log('External script finish');
+//# sourceMappingURL=http://example.com/script.js.pagespeed.sm.0JT2VEfKJs.map
+</pre>
+<p>
+ and the source map would look like this:
+</p>
+<pre class="prettyprint">
+)]}'
+{"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAGpC,GAAG,CAAC,IAAK,CAAE,CAAE,YAAY,CAAE,SAAS,CAAC,SAAS,CACjC,UAAU,CAAE,SAAS,CAAC,QAAQ,CAC9B,MAAM,CAAE,MAAM,CAAC,IAAI,CACnB,YAAY,CAAE,MAAM,CAAC,WAAY,CAAE,GAAI,CAAE,MAAM,CAAC,UAClD,CAAC,CAGZ,GAAG,CAAC,EAAG,CAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CACrC,GAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAE,CAChB,GAAG,CAAC,EAAG,CAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CACrC,EAAE,CAAC,SAAU,CAAE,GAAG,CAElB,GAAG,CAAC,EAAG,CAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CACrC,EAAE,CAAC,SAAU,CAAE,IAAI,CAAC,GAAG,CAAC,CAExB,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAClB,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CACpB,CAGA,GAAG,CAAC,OAAQ,CAAE,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAChD,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAEvB,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC","names":[],"sources":["http://example.com/script.js?PageSpeed=off"],"version":3}
+</pre>
+
+<h2>Limitations</h2>
+<ul>
+ <li>Source maps cannot be developed for inline JavaScript (because there
+ is no URL for the original JavaScript).</li>
+ <li>If your resources already have source maps, we ignore them and the
+ source map we add goes back to the URL you specify in HTML.
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/issues/930"
+ >Issue 930</a>)</li>
+</ul>
+
+<h2>Risks</h2>
+<p>
+ This filter should not have any effect for visitors to your site.
+ For developers, the biggest risk is that source maps are incorrect or out
+ of date, in which case the browser will show you a completely incorrect
+ location when debugging JavaScript. Clearing the cache or turning off
+ source maps should fix this problem.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-strip-scripts.html b/doc/filter-strip-scripts.html
new file mode 100644
index 0000000..891ba4d
--- /dev/null
+++ b/doc/filter-strip-scripts.html
@@ -0,0 +1,58 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Strip Scripts</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Strip Scripts</h1> <h2>Configuration</h2>
+ <p>
+ The 'Strip Scripts' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters strip_scripts</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters strip_scripts;</pre>
+</dl>
+ <p>
+ in the configuration file.
+ </p>
+ <h2>Description</h2>
+ <p>
+ The <code>strip_scripts</code> filter completely removes scripts from a
+ page. Obviously this will break functionality, and is disabled by
+ default. This can be used to facilitate timing tests showing the
+ maximum possible benefit of improving a site's JavaScript performance.
+ </p>
+ <h2>Risks</h2>
+ <p>
+ All functionality and visual effects that are dependent on JavaScript
+ will not work.
+ </p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-trim-urls.html b/doc/filter-trim-urls.html
new file mode 100644
index 0000000..572909b
--- /dev/null
+++ b/doc/filter-trim-urls.html
@@ -0,0 +1,122 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Trim URLs</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Trim URLs</h1>
+<h2>Configuration</h2>
+<p>
+The 'Trim URLs' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters trim_urls</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters trim_urls;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+This filter trims URLs by resolving them by making them relative to the base
+URL for the page. E.g. on <code>http://www.example.com/</code>,
+<code>"http://www.example.com/foo"</code> would be shortened to
+<code>"foo"</code>. The filter works only on URLs that are the values
+specified by <code>src</code> or <code>href</code> attributes.
+It also trims image URLs in CSS if
+<a href="filter-css-rewrite"><code>rewrite_css</code></a> is enabled.
+</p>
+<p>
+The filter reduces the transfer size of HTML files by shortening most of the
+URLs. Depending on the HTML file, this filter can significantly reduce the
+number of bytes transmitted on the network.
+</p>
+
+<h2>Operation</h2>
+<p>
+The 'Trim URLs' filter removes unnecessary bytes on the wire. While it's
+useful for development to fully specify your URLs so that links don't break when
+things move around, these are bytes that are sent unnecessarily on the wire.
+</p>
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <base href="http://www.example.com/">
+ </head>
+ <body>
+ <a href="http://www.example.com/bar">Link with long URL</a>
+ <img src="http://www.othersite.example.org/image.jpg">
+ </body>
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it to:
+</p>
+<pre class="prettyprint">
+<html>
+ <head>
+ <base href="http://www.example.com/">
+ </head>
+ <body>
+ <a href="bar">Link with long URL</a>
+ <img src="//www.othersite.example.org/image.jpg">
+ </body>
+</html>
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/trim_urls.html?ModPagespeed=on&ModPagespeedFilters=trim_urls">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+Only URLs referenced by <code>href</code> and <code>src</code> attributes and,
+if <a href="filter-css-rewrite"><code>rewrite_css</code></a> is enabled,
+URLs in CSS files are rewritten. URLs that occur elsewhere are not altered.
+</p>
+
+<h2>Risks</h2>
+<p>
+ Trimming URLs is considered medium risk. It can cause problems if it uses
+ the wrong base URL. This can happen, for example, if you serve HTML that
+ will be pasted verbatim into other HTML pages. If URLs are trimmed on the
+ first page, they will be incorrect for the page they are inserted into.
+ For this reason, it is off by default.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filter-whitespace-collapse.html b/doc/filter-whitespace-collapse.html
new file mode 100644
index 0000000..8d2ff02
--- /dev/null
+++ b/doc/filter-whitespace-collapse.html
@@ -0,0 +1,143 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Collapse Whitespace</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Collapse Whitespace</h1>
+
+<h2>Configuration</h2>
+<p>
+The 'Collapse Whitespace' filter is enabled by specifying:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters collapse_whitespace</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters collapse_whitespace;</pre>
+</dl>
+<p>
+in the configuration file.
+</p>
+
+<h2>Description</h2>
+<p>
+The 'Collapse Whitespace' filter reduces bytes transmitted in an HTML file
+by removing unnecessary whitespace.
+</p>
+
+<h2>Operation</h2>
+The filter reduces the transfer size of HTML files by replacing contiguous
+whitespace with a single whitespace character. Because HTML is often
+formatted with extra whitespace for human readability or as an incidental
+effect of the templates used to generate it, this technique can reduce
+the number of bytes needed to transmit HTML resources.
+<p>
+For example, if the HTML document looks like this:
+</p>
+<pre class="prettyprint">
+<html>
+
+ <head>
+ <title>Hello, world! </title>
+ <script> var x = 'Hello, world!';</script>
+ </head>
+
+ <body>
+ Hello, World!
+ <pre>
+ Hello,
+ World!
+ </pre>
+ </body>
+
+</html>
+</pre>
+<p>
+Then PageSpeed will rewrite it into:
+</p>
+<pre class="prettyprint">
+<html>
+<head>
+<title>Hello, world!</title>
+<script> var x = 'Hello, world!';</script>
+</head>
+<body>
+Hello, World!
+<pre>
+ Hello,
+ World!
+</pre>
+</body>
+</html>
+</pre>
+
+<h3>Example</h3>
+<p>
+You can see the filter in action at <code>www.modpagespeed.com</code> on this
+<a href="https://www.modpagespeed.com/examples/collapse_whitespace.html?ModPagespeed=on&ModPagespeedFilters=collapse_whitespace">example</a>.
+</p>
+
+<h2>Requirements</h2>
+<p>
+The 'Collapse Whitespace' filter will not modify whitespace appearing
+within <code><pre></code>, <code><textarea></code>, <code><script></code> and <code><style></code>. Extraneous whitespace
+within inline scripts and styles can be removed using the
+<a href="filter-js-minify">JS Minify</a> and <a href="filter-css-rewrite"
+>CSS Minify</a> filters.
+</p>
+<p>
+The 'Collapse Whitespace' filter will attempt to preserve newline
+characters to an extent -- a contiguous sequence of whitespace with at
+least one newline anywhere in it will always collapse to a single new line.
+Why? See the <a href="faq#collapse-newlines">collapse newlines entry in the
+FAQ</a>.
+</p>
+
+<h2>Risks</h2>
+<p>
+Although contiguous whitespace in HTML (beyond the first space) is
+normally ignored by the browser outside of tags like <code><pre>
+</code> and <code><textarea></code>, one can use CSS properties
+such as <code>"white-space: pre"</code> to make the browser preserve
+whitespace within a portion of the document: compare this example
+<a href="https://www.modpagespeed.com/examples/mod_pagespeed_example/css_whitespace.html?ModPagespeed=on&ModPagespeedFilters=collapse_whitespace">with</a>
+and
+<a href="https://www.modpagespeed.com/examples/mod_pagespeed_example/css_whitespace.html?ModPagespeed=off">without</a>
+the filter enabled.
+</p>
+<p>
+Use of such properties is relatively rare, however, the 'Collapse
+Whitespace' filter is not yet CSS-aware, so any pages that might use
+such CSS properties (either statically or dynamically) should not use
+this filter at this time.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/filters.html b/doc/filters.html
new file mode 100644
index 0000000..94ff4b6
--- /dev/null
+++ b/doc/filters.html
@@ -0,0 +1,158 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Filters</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed Filters</h1>
+
+<p>
+PageSpeed improves web page latency by changing the resources on that
+web page to implement web performance
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rules_intro">best practices</a>. Each sort
+of change that PageSpeed makes is embodied in a <em>filter</em>. The filters
+are run in a pre-defined order, but can be enabled and disabled in the server
+<a href="configuration">configuration file</a>.
+</p>
+<p>
+Some filters simply alter HTML content, such as removing excess
+whitespace, attributes, or attribute values that will be ignored.
+</p>
+<p>
+Other filters change references to CSS, JavaScript, or images to point
+to more optimized versions, because they:
+</p>
+<ul>
+ <li>are smaller,</li>
+ <li>combine multiple files into one, and</li>
+ <li>extend the cache lifetime</li>
+</ul>
+
+<h2>Categories of filters</h2>
+<p>
+Filters are of many categories that fit under performance best practices.
+The current set of filters fits in these categories as follows:
+</p>
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/caching">
+ <h3>Optimize Caching</h3>
+</a>
+<ul>
+ <li><a href="filter-canonicalize-js">Canonicalize JavaScript Libraries</a>
+ <li><a href="filter-cache-extend">Extend Cache</a></li>
+ <li><a href="filter-cache-extend-pdfs">Extend Cache PDFs</a></li>
+ <li><a href="filter-local-storage-cache">Local Storage Cache</a></li>
+ <li><a href="filter-css-outline">Outline CSS</a></li>
+ <li><a href="filter-js-outline">Outline JavaScript</a></li>
+</ul>
+
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rtt">
+ <h3>Minimize Round Trip Times</h3>
+</a>
+<ul>
+ <li><a href="filter-css-combine">Combine CSS</a></li>
+ <li><a href="filter-flatten-css-imports">Flatten CSS @imports</a></li>
+ <li><a href="filter-css-inline">Inline CSS</a></li>
+ <li><a href="filter-css-inline-google-fonts">Inline Google Fonts API CSS</a></li>
+ <li><a href="filter-js-combine">Combine JavaScript</a></li>
+ <li><a href="filter-js-inline">Inline JavaScript</a></li>
+ <li><a href="filter-css-above-scripts">Move CSS Above Scripts</a></li>
+ <li><a href="domains#shard">Configuration file directive to
+ shard domains</a></li>
+ <li><a href="filter-image-sprite">Sprite Images</a></li>
+ <li><a href="filter-insert-dns-prefetch">Pre-Resolve DNS</a></li>
+</ul>
+
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/request">
+ <h3>Minimize Request Overhead</h3>
+</a>
+<ul>
+ <li><a href="filter-domain-rewrite">Rewrite Domains</a></li>
+ <li><a href="domains#mapping_rewrite">Configuration
+ file directive to map domains</a></li>
+</ul>
+
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/payload">
+ <h3>Minimize Payload Size</h3>
+</a>
+<ul>
+ <li><a href="filter-whitespace-collapse">Collapse Whitespace</a></li>
+ <li><a href="filter-head-combine">Combine Heads</a></li>
+ <li><a href="filter-attribute-elide">Elide Attributes</a></li>
+ <li><a href="filter-js-minify">Minify JavaScript</a></li>
+ <li><a href="filter-image-optimize">Optimize Images</a></li>
+ <li><a href="filter-prioritize-critical-css">Prioritize Critical CSS</a></li>
+ <li><a href="filter-dedup-inlined-images">Deduplicate Inlined Images</a></li>
+ <li><a href="filter-comment-remove">Remove Comments</a></li>
+ <li><a href="filter-quote-remove">Remove Quotes</a></li>
+ <li><a href="filter-css-rewrite">Rewrite CSS</a></li>
+ <li><a href="filter-rewrite-style-attributes"
+ >Rewrite Style Attributes</a></li>
+ <li><a href="filter-trim-urls">Trim URLs</a></li>
+</ul>
+
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rendering">
+ <h3>Optimize Browser Rendering</h3></a>
+<ul>
+ <li><a href="filter-convert-meta-tags">Convert Meta Tags</a></li>
+ <li><a href="filter-js-defer">Defer Javascript</a></li>
+ <li><a href="filter-hint-preload-subresources"
+ >Hint Resource Preloading</a></li>
+ <li><a href="filter-inline-preview-images">Inline Preview Images</a></li>
+ <li><a href="filter-lazyload-images">Lazily Load Images</a></li>
+ <li><a href="filter-image-responsive">Make Images Responsive</a></li>
+ <li><a href="filter-css-to-head">Move CSS to Head</a></li>
+ <li><a href="filter-image-optimize">Optimize Images</a></li>
+ <li><a href="reference-image-optimize#progressive"
+ >Convert JPEG to Progressive</a></li>
+ <li><a href="filter-rewrite-style-attributes"
+ >Rewrite Style Attributes</a></li>
+</ul>
+
+<h3>Other</h3>
+<ul>
+ <li><a href="filter-head-add">Add Head</a></li>
+ <li><a href="filter-instrumentation-add">Add Instrumentation</a></li>
+ <li><a href="filter-source-maps-include"
+ >Include JavaScript Source Maps</a></li>
+ <li><a href="filter-css-inline-import">Inline @import to Link</a></li>
+ <li><a href="filter-insert-ga">Insert Google Analytics Snippet</a></li>
+ <li><a href="filter-make-show-ads-async"
+ >Make Google AdSense Async</a></li>
+ <li><a href="filter-make-google-analytics-async"
+ >Make Google Analytics Async</a></li>
+ <li><a href="filter-pedantic">Pedantic</a></li>
+ <li><a href="module-run-experiment">Run Experiment</a></li>
+</ul>
+
+<p>
+In some cases, a filter such as 'Optimize Images' helps both minimize request overhead and optimize browser rendering.
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/https_support.html b/doc/https_support.html
new file mode 100644
index 0000000..7d77c4b
--- /dev/null
+++ b/doc/https_support.html
@@ -0,0 +1,392 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed HTTPS Support</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed HTTPS Support</h1>
+ <p class="note">
+ As of version 1.10 HTTPS fetching (<code>FetchHttps</code>) is enabled by
+ default, and PageSpeed no longer requires additional configuration to
+ fetch and optimize resources over https. The alternatives described
+ below, however, are more efficient in situations where they apply.
+ </p>
+
+ <p>
+ PageSpeed supports sites that serve content through https. There are
+ several mechanisms through which PageSpeed can be configured to fully
+ optimize sites served under https:
+ </p>
+ <ul>
+ <li>Use <code>MapOriginDomain</code> to
+ <a href="https_support#map_the_origin">map the https domain to an http
+ domain</a>.</li>
+ <li>Use <code>LoadFromFile</code> to
+ <a href="https_support#load_from_file">map a
+ locally available directory to the https domain</a>.</li>
+ <li>Use <code>FetchHttps</code> to <a href="https_support#https_fetch"
+ >directly fetch HTTPS resources</a> (On by default since 1.10).</li>
+ </ul>
+
+ <p>
+ The first two mechanisms can both be used on the same server, but they
+ must be used for different domains, for example:
+ </p>
+
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ > ModPagespeedMapOriginDomain "http://localhost" "https://www.example.com"
+ ModPagespeedLoadFromFile "https://static.example.com" "/var/www/example/static/"</pre>
+ </dd></dt>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ > pagespeed MapOriginDomain "http://localhost" "https://www.example.com";
+ pagespeed LoadFromFile "https://static.example.com" "/var/www/example/static/";</pre>
+ </dl>
+
+ <p>
+ Even without configuring any of these options, PageSpeed
+ rewrites HTML documents requested via https. PageSpeed is able to
+ serve these documents because the server passes the HTML document through
+ all its output filters, including *_pagespeed. But by default,
+ PageSpeed will only rewrite non-HTML resources which are served
+ via http. Due to the complexity and security required to manage client
+ SSL certificates, PageSpeed requires the server administrator to
+ explicitly enable https fetching.
+ </p>
+
+ <p>
+ The configuration options mentioned above are intended to help
+ optimize sites with HTTPS resources. Fetching https resource URLs
+ using http should be used only in installations where using http is
+ safe, such as where the server running PageSpeed is a
+ front-end to other back-end systems with private communications and
+ mutual trust between them.
+ </p>
+
+ <h2 id="map_the_origin">Map the origin domain</h2>
+
+ <p>
+ Https resource URLs can be fetched by mapping them to a non-https origin
+ domain as described in
+ <a href="domains#mapping_origin">Mapping Origin Domains</a>:
+ </p>
+ <dl>
+ <dt>Apache:<dd>
+<pre class="prettyprint">
+ ModPagespeedMapOriginDomain "http://localhost" "https://www.example.com"
+</pre>
+ </dd></dt>
+ <dt>Nginx:<dd>
+<pre class="prettyprint">
+ pagespeed MapOriginDomain "http://localhost" "https://www.example.com";
+</pre>
+ </dd></dt>
+ </dl>
+
+ <p>
+ This allows the server to accept https requests for
+ <code>www.example.com</code> while fetching resources for it from the
+ <code>localhost</code> http server, which could be the same Apache process or a
+ different server process. All fetched resources will be optimized as usual. As
+ many <code>MapOriginDomain</code> directives can be used as is required as long
+ as https is only used on the second domain.
+ </p>
+
+ <h2 id="load_from_file">Load static files from disk</h2>
+
+ <p>
+ Https resource URLs can be served from static files using the
+ <a href="domains#ModPagespeedLoadFromFile">LoadFromFile</a> directive:
+ </p>
+
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedLoadFromFile "https://www.example.com" "/var/www/example/static/";</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed LoadFromFile "https://www.example.com" "/var/www/example/static/";</pre>
+ </dl>
+
+ <h2 id="https_fetch">Fetch HTTPS resources directly</h2>
+ <p>
+ HTTPS fetching is built in and is enabled by default as of 1.10.33.0.
+ To turn the feature off, set <code>FetchHttps</code> to
+ <code>disable</code>:
+ </p>
+
+ <dl>
+ <dt>Apache:<dd>
+<pre class="prettyprint">
+ ModPagespeedFetchHttps enable
+</pre>
+ </dd></dt>
+ <dt>Nginx:<dd>
+<pre class="prettyprint">
+ pagespeed FetchHttps enable;
+</pre>
+ </dd></dt>
+ </dl>
+ <p>
+ You may set multiple options, separated with a comma. For example, to
+ test a configuration with a self-signed certificate you could do:
+ </p>
+
+ <dl>
+ <dt>Apache:<dd>
+<pre class="prettyprint">
+ ModPagespeedFetchHttps enable,allow_self_signed
+</pre>
+ </dd></dt>
+ <dt>Nginx:<dd>
+<pre class="prettyprint">
+ pagespeed FetchHttps enable,allow_self_signed;
+</pre>
+ </dd></dt>
+ </dl>
+
+ <p>
+ The available options are
+ <ul>
+ <li><code>enable</code></li>
+ <li><code>disable</code></li>
+ <li><code>allow_self_signed</code></li>
+ <li><code>allow_unknown_certificate_authority</code></li>
+ <li><code>allow_certificate_not_yet_valid</code></li>
+ </ul>
+ </p>
+
+
+ <h3 id="configuring_ssl_certificates">Configuring SSL Certificates</h3>
+
+ <p>
+ Acting as an HTTPS client, PageSpeed must be configured to point to a
+ directory identifying trusted
+ <a href="http://en.wikipedia.org/wiki/Certificate_authority"
+ >Certificate Authorities</a> (not SSL keys for your domain). These settings will be automatically
+ applied to configuration files for new binary installations on Debian,
+ Ubuntu, and CentOS systems. Upgrades, source-installs, and other
+ distributions may require manual configuration updates to identify the
+ proper location.</p>
+
+ <dl>
+ <dt>Apache:<dd>
+<pre class="prettyprint">
+ # Certificate Authorities directory, not your domain SSL keys
+ ModPagespeedSslCertDirectory directory
+ # Web Server's HTTPS client SSL key, not your domain SSL keys
+ ModPagespeedSslCertFile file
+</pre>
+ </dd></dt>
+ <dt>Nginx:<dd>
+<pre class="prettyprint">
+ pagespeed SslCertDirectory directory;
+ pagespeed SslCertFile file;
+</pre>
+ </dd></dt>
+ </dl>
+
+ <p>
+ The default directory for Debian-based systems
+ is <code>/etc/ssl/certs</code>, and there is no certificate file
+ setting. On CentOS-based systems, the default directory
+ is <code>/etc/pki/tls/certs</code> and default file
+ is <code>/etc/pki/tls/cert.pem</code>.</p>
+
+ <p>
+ These directive cannot be used
+ in <a href="configuration#htaccess"><code>.htaccess</code> files
+ or <code><Directory></code></a> scopes.
+ </p>
+
+ <h2 id="rewrite_domains">Rewrite domains</h2>
+
+ <p>
+ Rewritten resources can have their https domain rewritten if required
+ for the reasons described in <a href="domains#mapping_rewrite">Mapping Rewrite
+ Domains</a>:
+ </p>
+
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ > ModPagespeedMapOriginDomain "http://localhost" "https://www.example.com"
+ ModPagespeedMapRewriteDomain "https://example.cdn.com" "https://www.example.com"</pre>
+ </dd></dt>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ > pagespeed MapOriginDomain "http://localhost" "https://www.example.com";
+ pagespeed MapRewriteDomain "https://example.cdn.com" "https://www.example.com";</pre>
+ </dd></dt>
+ </dl>
+
+ <h2 id="shard_domains">Shard domains</h2>
+
+ <p>
+ Rewritten resources can have their https domain sharded if required
+ for the reasons described in <a href="domains#shard">Sharding Domains</a>:
+ </p>
+
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ > ModPagespeedMapOriginDomain "http://localhost" "https://www.example.com"
+ ModPagespeedShardDomain "https://www.example.com" \
+ "https://example1.cdn.com,https://example2.cdn.com"</pre>
+ </dd></dt>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ > pagespeed MapOriginDomain "http://localhost" "https://www.example.com";
+ pagespeed ShardDomain "https://www.example.com"
+ "https://example1.cdn.com,https://example2.cdn.com";</pre>
+ </dd></dt>
+ </dl>
+
+ <h2 id="RespectXForwardedProto">Respecting X-Forwarded-Proto</h2>
+ <p>
+ If you are running behind a load-balancer or other front-end that
+ terminates the HTTPS connection and makes an HTTP subrequest to your
+ server running PageSpeed, it will not know that the original URL was
+ HTTPS and so it will rewrite subresources with <code>http://</code> URLs.
+ For PageSpeed to operate correctly, it needs to know what
+ the originally requested URL was. If your front-end sends
+ <code>X-Forwarded-Proto</code> headers (as, for example,
+ <a href="https://forums.aws.amazon.com/ann.jspa?annID=805">AWS Elastic
+ Load Balancer does</a>) then you can tell PageSpeed to
+ respect that header with:
+ </p>
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ > ModPagespeedRespectXForwardedProto on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ > pagespeed RespectXForwardedProto on;</pre>
+ </dl>
+ <p>
+ This will correctly rewrite your subresources with <code>https://</code>
+ URLs and thus avoid mixed content warnings. Note, that you should only
+ enable this option if you are behind a load-balancer that will set this
+ header, otherwise your users will be able to set the protocol
+ PageSpeed uses to interpret the request. Also, note that by default
+ PageSpeed will loop back to the inbound ip/port for fetching resources
+ on behalf of a html response using http(s). When X-Forwarded-Proto is in
+ effect and the protocol is changed in front of the PageSpeed-enabled server,
+ a mismatch may arise when performing loopback fetches, leading up to fetching
+ failures. Explicitly authorizing the domain used to fetch resources will
+ resolve this problem, because doing so allows the loopback fetching mechanism
+ to be bypassed.
+ </p>
+
+ <p>
+ This directive cannot be used
+ in <a href="configuration#htaccess"><code>.htaccess</code> files
+ or <code><Directory></code></a> scopes.
+ </p>
+
+ <h2 id="risks">Risks</h2>
+ <p>
+ As discussed above, using http to fetch https resources URLs should only be
+ used when communication between the front-end and back-end servers is secure
+ as otherwise the benefits of using https in the first place are lost. When
+ fetching by HTTPS, <a
+ href="https://boringssl.googlesource.com/boringssl/">BoringSSL</a>
+ is used to authenticate the fetches. We bundle a copy of BoringSSL, which
+ means that when security vulnerabilities are discovered that affect our usage
+ we need to release updated versions of PageSpeed with the fixed BoringSSL
+ library.
+ </p>
+
+ <h2 id="h2_configuration">HTTP/2-specific configuration</h2>
+ <p>
+ It's possible to tell PageSpeed to use a different configuration for
+ clients using the HTTP/2 protocol than for clients using HTTP/1. You can
+ configure this with the <code><If></code> construct in Apache and
+ with script variables in Nginx.
+ </p>
+ <h3 id="h2_configuration_apache">Apache Version</h3>
+ <p class="note">Note: Versions older than 1.12.34.1 provided
+ a <code><ModPagespeedIf></code> construct. This is no longer supported, but
+ configuration inside <code><ModPagespeedIf !spdy></code> blocks will be applied
+ unconditionally for backwards compatibility.</p>
+
+ <p>mod_http2 in Apache ≥ 2.4.19 provides an HTTP2 variable that can be used with the
+ server's <code><If></code> construct to provide a different configuration for
+ HTTP2 sessions. For example, one may want to disable some filters in such sessions, and only
+ enable sharding in HTTP/1:
+<pre class="prettyprint">
+<If "%{HTTP2} == 'on'">
+ ModPagespeedDisableFilters filter1,filter2
+</If>
+<Else>
+ ModPagespeedShardDomain https://www.example.com https://example1.cdn.com,https://example2.cdn.com
+</Else></pre>
+
+ <p>
+ Note that this only covers requests terminated by mod_http2 on the Apache server itself.
+ If an earlier proxy terminates HTTP/2, you may need to have it set a custom header,
+ and test it using the <code>req</code> function.
+ </p>
+
+ <h3 id="h2_configuration_nginx">Nginx Version</h3>
+ <p class="note"><strong>Note: New feature as of 1.10.33.0</strong></p>
+<pre class="prettyprint">
+http {
+ pagespeed ProcessScriptVariables on;
+ server {
+ set $disable_filters "";
+ set $domain_shards "shard1,shard2,shard3..."
+
+ if ($http2) {
+ set $disable_filters "filter1,filter2";
+ set $domain_shards "";
+ }
+ pagespeed DisableFilters "$disable_filters";
+ pagespeed ShardDomain domain_to_shard "$domain_shards";
+ }
+}</pre>
+ <p>
+ The <code>$http2</code> variable is defined by
+ the <a href="http://nginx.org/en/docs/http/ngx_http_v2_module.html"
+ ><code>ngx_http_v2_module</a></code>, and will be non-empty on any
+ connection over HTTP/2.
+ </p>
+ <p>
+ If the connection is terminated on another server
+ the <code>$http2</code> variable won't be available. In that case, you
+ can have the other server add a header for HTTP/2 connections
+ like <code>X-ConnectionIsHTTP2</code> and then use
+ the <code>http_X_ConnectionIsHTTP2</code> variable in
+ the <code>if</code>-block above.
+ </p>
+ <p>
+ Note that this configuration depends on the <code>if</code> construct,
+ which <a href="https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/">is
+ generally discouraged</a>. Using <code>if</code> only to set variables in
+ server blocks, however, is completely safe.
+ </p>
+ <p>
+ For more details on script variables, including how to handle dollar
+ signs, see <a href="system#nginx_script_variables">Script Variable
+ Support</a>.
+ </p>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/images/admin_config.png b/doc/images/admin_config.png
new file mode 100755
index 0000000..0864b5d
--- /dev/null
+++ b/doc/images/admin_config.png
Binary files differ
diff --git a/doc/images/downstream_caching.png b/doc/images/downstream_caching.png
new file mode 100644
index 0000000..cce3779
--- /dev/null
+++ b/doc/images/downstream_caching.png
Binary files differ
diff --git a/doc/images/purge_entire_cache.png b/doc/images/purge_entire_cache.png
new file mode 100644
index 0000000..7c1d566
--- /dev/null
+++ b/doc/images/purge_entire_cache.png
Binary files differ
diff --git a/doc/images/purge_one_url.png b/doc/images/purge_one_url.png
new file mode 100644
index 0000000..7ce6de9
--- /dev/null
+++ b/doc/images/purge_one_url.png
Binary files differ
diff --git a/doc/images/puzzle_optimized_to_low_quality_webp.webp b/doc/images/puzzle_optimized_to_low_quality_webp.webp
new file mode 100644
index 0000000..c11bda6
--- /dev/null
+++ b/doc/images/puzzle_optimized_to_low_quality_webp.webp
Binary files differ
diff --git a/doc/images/puzzle_optimized_to_low_quality_webp_and_saved_as_png.png b/doc/images/puzzle_optimized_to_low_quality_webp_and_saved_as_png.png
new file mode 100644
index 0000000..b11690d
--- /dev/null
+++ b/doc/images/puzzle_optimized_to_low_quality_webp_and_saved_as_png.png
Binary files differ
diff --git a/doc/images/puzzle_original.jpg b/doc/images/puzzle_original.jpg
new file mode 100644
index 0000000..a119109
--- /dev/null
+++ b/doc/images/puzzle_original.jpg
Binary files differ
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..e756522
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,131 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Installing From Packages</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+
+<div id=header>
+ <div id=logoline>
+ <div id=logo>
+ <img src="https://www.gstatic.com/images/branding/product/1x/pagespeed_32dp.png"
+ srcset="https://www.gstatic.com/images/branding/product/2x/pagespeed_32dp.png"
+ width=32 height=32 alt="pagespeed logo">
+ </div>
+ <div id=logotext>Apache PageSpeed (Incubating)</div>
+ </div>
+ <div id=navline>
+ <a href="..">← Overview</a>
+ </div>
+</div>
+
+<img src="/incubator.png" height="80" align="right">
+
+<h1>PageSpeed Documentation</h1>
+<p>
+PageSpeed improves web page latency by <a href="/doc/filters">changing the resources</a>
+on that web page to implement
+<a target="_blank" href="https://developers.google.com/speed/docs/best-practices/rules_intro">
+web performance best practices</a>
+</p>
+<div class=columns>
+<div id=guides class=column>
+<h2>Guides</h2>
+<p><a href="download">Installing From Packages</a>
+<p><a href="build_mod_pagespeed_from_source">Installing From Source: Apache</a>
+<p><a href="build_ngx_pagespeed_from_source">Installing From Source: Nginx</a>
+<p><a href="configuration">Module Configuration</a>
+<p><a href="admin">Admin Pages</a>
+<p><a href="config_filters">Configuring Filters</a>
+<p><a href="optimize-for-bandwidth">Optimizing for Bandwidth</a>
+<p><a href="domains">Mapping Domains</a>
+<p><a href="restricting_urls">URL Control</a>
+<p><a href="https_support">HTTPS Support</a>
+<p><a href="system">System Integration</a>
+<p><a href="downstream-caching">Configuring Downstream Caches</a>
+<p><a href="experiment">Manual Experiments</a>
+<p><a href="module-run-experiment">Automated Experiments</a>
+<p><a href="console">Console</a>
+<p><a href="mod_security">Security Considerations</a>
+</div>
+
+<div id=reference class=column>
+<h2>Reference</h2>
+<p><a href="filter-head-add">Add Head</a>
+<p><a href="filter-instrumentation-add">Add Instrumentation</a>
+<p><a href="filter-make-show-ads-async">Async Google AdSense</a>
+<p><a href="filter-make-google-analytics-async">Async Google Analytics</a>
+<p><a href="filter-canonicalize-js">Canonicalize JavaScript Libraries</a>
+<p><a href="filter-whitespace-collapse">Collapse Whitespace</a>
+<p><a href="filter-css-combine">Combine CSS</a>
+<p><a href="filter-js-combine">Combine JavaScript</a>
+<p><a href="filter-head-combine">Combine Heads</a>
+<p><a href="filter-convert-meta-tags">Convert Meta Tags</a>
+<p><a href="filter-dedup-inlined-images">Deduplicate Inlined Images</a>
+<p><a href="filter-js-defer">Defer JavaScript</a>
+<p><a href="filter-attribute-elide">Elide Attributes</a>
+<p><a href="filter-cache-extend">Extend Cache</a>
+<p><a href="filter-cache-extend-pdfs">Extend Cache PDFs</a>
+<p><a href="reference-image-optimize"
+ >Filters and Options for Optimizing Images</a>
+<p><a href="filter-flatten-css-imports">Flatten CSS @imports</a>
+<p><a href="filter-hint-preload-subresources">Hint Resource Preloading</a>
+<p><a href="filter-source-maps-include">Include JavaScript Source Maps</a>
+<p><a href="filter-css-inline-import">Inline @import to Link</a>
+<p><a href="filter-css-inline">Inline CSS</a>
+<p><a href="filter-css-inline-google-fonts">Inline Google Fonts API CSS</a>
+<p><a href="filter-js-inline">Inline JavaScript</a>
+<p><a href="filter-inline-preview-images">Inline Preview Images</a>
+<p><a href="filter-insert-ga">Insert Google Analytics</a>
+<p><a href="filter-lazyload-images">Lazily Load Images</a>
+<p><a href="filter-local-storage-cache">Local Storage Cache</a>
+<p><a href="filter-image-responsive">Make Images Responsive</a>
+<p><a href="filter-js-minify">Minify JavaScript</a>
+<p><a href="filter-css-above-scripts">Move CSS Above Scripts</a>
+<p><a href="filter-css-to-head">Move CSS to Head</a>
+<p><a href="filter-image-optimize">Optimize Images</a>
+<p><a href="filter-css-outline">Outline CSS</a>
+<p><a href="filter-js-outline">Outline JavaScript</a>
+<p><a href="filter-pedantic">Pedantic</a>
+<p><a href="filter-insert-dns-prefetch">Pre-Resolve DNS</a>
+<p><a href="filter-prioritize-critical-css">Prioritize Critical CSS</a>
+<p><a href="filter-comment-remove">Remove Comments</a>
+<p><a href="filter-quote-remove">Remove Quotes</a>
+<p><a href="filter-css-rewrite">Rewrite CSS</a>
+<p><a href="filter-domain-rewrite">Rewrite Domain</a>
+<p><a href="filter-rewrite-style-attributes">Rewrite Style Attributes</a>
+<p><a href="module-run-experiment">Run Experiments</a>
+<p><a href="filter-image-sprite">Sprite Images</a>
+<p><a href="filter-trim-urls">Trim URLs</a>
+</div>
+
+<div id=support class=column>
+<h2>Support</h2>
+<p><a href="faq">FAQ</a>
+<p><a href="release_notes">Release Notes</a>
+<p><a href="mailing-lists">Mailing Lists</a>
+</div>
+</div>
+
+ </body>
+</html>
diff --git a/doc/mailing-lists.html b/doc/mailing-lists.html
new file mode 100644
index 0000000..b4622d5
--- /dev/null
+++ b/doc/mailing-lists.html
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Mailing Lists</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed Mailing Lists</h1>
+ <h2 id="announcements">Announcements</h2>
+ <p>
+ Announcements of things we think everyone running PageSpeed would want to
+ know: security vulnerabilities, bug workarounds, and new releases. This
+ is very low traffic, with a post every few months.
+ </p>
+ <ul>
+ <li><a
+ href="https://groups.google.com/forum/#!forum/mod-pagespeed-announce"
+ >mod-pagespeed-announce</a></li>
+ <li><a
+ href="https://groups.google.com/forum/#!forum/ngx-pagespeed-announce"
+ >ngx-pagespeed-announce</a></li>
+ </ul>
+
+ <h2 id="discussion">Discussion</h2>
+ <p>
+ General discussion about using PageSpeed. Post here to ask a question or
+ help answer someone else's.
+ </p>
+ <ul>
+ <li><a
+ href="https://groups.google.com/forum/#!forum/mod-pagespeed-discuss"
+ >mod-pagespeed-discuss</a></li>
+ <li><a
+ href="https://groups.google.com/forum/#!forum/ngx-pagespeed-discuss"
+ >ngx-pagespeed-discuss</a></li>
+ </ul>
+
+ <h2 id="development">Development</h2>
+ <p>
+ Detailed technical discussion about the implementation of PageSpeed.
+ Intended for people working on PageSpeed and ports to other web servers.
+ </p>
+ <ul>
+ <li><a
+ href="http://mail-archives.apache.org/mod_mbox/incubator-pagespeed-dev/"
+ >pagespeed-dev</a></li>
+ </ul>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/mod_security.html b/doc/mod_security.html
new file mode 100644
index 0000000..e14edc3
--- /dev/null
+++ b/doc/mod_security.html
@@ -0,0 +1,81 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Security Considerations for PageSpeed</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Security Considerations for PageSpeed</h1>
+
+
+<p>
+Any change to a website has the possibility of introducing new security holes.
+Pagespeed is not an exception to this rule. This document covers specific
+security concerns to keep in mind when using PageSpeed.
+</p>
+
+<h2 id="untrusted_content">Untrusted Content</h2>
+<p>
+Any time you reference untrusted content on your website, you are at risk of
+security attack. This is most clear for JavaScript which will have access to
+your domain's cookies because of the Same Origin Policy. It can also be true
+for CSS, which can contain JavaScript references (ex. the IE behavior
+property described in this
+<a href="http://www.w3.org/TR/1999/WD-becss-19990804#behavior">W3C reference</a>
+and at this <a href="http://reference.sitepoint.com/css/behavior">reference</a>
+by SitePoint®. Even images in certain situations can be used in attacks
+(ex: <a href="http://hackaday.com/2008/08/04/the-gifar-image-vulnerability/">
+GIFAR attack</a>).
+</p>
+<p class="caution">
+<strong>Caution:</strong>
+Do not reference untrusted content on your website. If you do store
+user content or other untrusted content, keep it on a separate cookie-less
+domain and do <strong>NOT</strong> tell PageSpeed to rewrite from that
+domain to your main cookied domain.
+</p>
+
+<h2 id="private_content">Private Content</h2>
+<p>
+PageSpeed rewrites and, effectively, proxies resources referenced in
+the main HTML document. It respects public caching headers, so if a resource
+is not explicitly marked public cacheable, PageSpeed will not rewrite
+nor re-serve it. However, PageSpeed will re-serve resources which
+<strong>ARE</strong> publicly cacheable.
+If you serve private content as publicly cacheable,
+PageSpeed will proxy it to any who requests a specific URL. Note that any
+public proxy in the Internet can do the same thing.
+</p>
+<p class="caution">
+<strong>Caution:</strong>
+Explicitly mark private content as not publicly cacheable.
+</p>
+
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/module-run-experiment.html b/doc/module-run-experiment.html
new file mode 100644
index 0000000..c21be13
--- /dev/null
+++ b/doc/module-run-experiment.html
@@ -0,0 +1,458 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Run Experiment</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Run Experiment</h1>
+<h2>Overview</h2>
+
+This feature allows you to run experiments where segments of your traffic get
+the page rewritten with different settings in order to figure out which filters
+work best for your site. It reports to your
+<a href="http://www.google.com/analytics/">Google Analytics</a> account, storing
+data in a
+<a href="/analytics/devguides/collection/gajs/gaTrackingCustomVariables">custom
+variable</a>
+or <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/experiments">content
+experiment</a>.
+
+<h2>Configuration</h2>
+<p>
+To run an experiment you must set several options in the configuration file.
+First, you turn on this feature and tell it
+your <a href="http://support.google.com/analytics/bin/answer.py?hl=en&answer=1032385">Web
+Property ID</a>:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedRunExperiment on
+ModPagespeedUseAnalyticsJs off // use ga.js
+ModPagespeedAnalyticsID UA-XXXXXXX-Y</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed RunExperiment on;
+pagespeed UseAnalyticsJs off;
+pagespeed AnalyticsID UA-XXXXXXX-Y;</pre>
+</dl>
+<p>
+This will enable several filters needed for experiments including
+the <a href="filter-insert-ga">Insert Google Analytics</a> filter to insert
+the <code>ga.js</code> tracking snippet into each page. If you already have a
+tracking snippet on your pages, the lowest risk option is to remove it so that
+the one PageSpeed inserts is the only one. If you do choose to leave your
+existing snippet, PageSpeed will attempt to modify it to add experiment
+tracking. If you've customized your snippets you should manually verify that
+the modified snippet is still correct.
+</p>
+<p>
+To disable experiments and experiment tracking you can set RunExperiment to
+'off':
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRunExperiment off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RunExperiment off;</pre>
+</dl>
+If you still want PageSpeed to automatically insert the Google Analytics
+tracking snippet, you need to enable the insert_ga filter:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters insert_ga</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters insert_ga;</pre>
+</dl>
+</p>
+<p>
+Once you have turned on RunExperiment and set your Google Analytics id you can
+set up an experiment. For example, to test how much PageSpeed is speeding
+up your site you can apply optimizations for only half your visitors:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedExperimentSpec id=1;percent=50;default
+ModPagespeedExperimentSpec id=2;percent=50</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed ExperimentSpec "id=1;percent=50;default";
+pagespeed ExperimentSpec "id=2;percent=50";</pre>
+</dl>
+<p>
+Each <code>ExperimentSpec</code> defines an experimental treatment or
+specification. We only insert experiment tracking for users that fall into a
+defined group, so you should define both an experiment group and a control
+group. The specification is a semicolon-separated list of settings. Some
+settings are required:
+<dl>
+ <dt><code>id</code><dd>A positive integer, unique across all experiments. You
+ can't reuse ids from one experiment to the next; every id must be unique.
+ If you stop running an experiment that had three experiment specs 1, 2,
+ and 3, then your next experiment should start with id 4 or higher.
+ <dt><code>percent</code><dd>An integer between 0 and 100 indicating what
+ fraction of users should receive this treatment. If the sum
+ of <code>percent</code> over all treatments is less than 100 then the
+ remaining users will be assigned to 'no experiment' and continue seeing
+ what they usually would. If the sum exceeds 100 it will report an error
+ when parsing the config file.
+</dl>
+</p>
+<p>
+ExperimentSpec 1 above adds the optional setting <code>default</code>, described
+below, which tells PageSpeed to apply just the filters and settings
+it would normally apply. ExperimentSpec 2 specifies nothing and so turns off
+all filters.
+</p>
+<p>
+To report on these settings, PageSpeed will inject JavaScript into the page
+to send data to your Analytics account. It will set one of the following for
+each visitor:
+<pre class="prettyprint">
+_gaq.push(['_setCustomVar', 1, 'ExperimentState', 'Experiment: 1']);
+_gaq.push(['_setCustomVar', 1, 'ExperimentState', 'Experiment: 2']);
+</pre>
+</p>
+<p>
+In addition to <code>id</code> and <code>percent</code> described above, there
+are additional optional settings intended to give you a way to test many
+settings you could set in the configuration file:
+</p>
+<dl>
+ <dt><code>default</code><dd>Apply the filters and settings that would
+ normally apply. Warning: prior to 1.9.32.1 this setting could not be
+ used in combination with any others. It would override any other
+ configuration specified in the experiment spec, and the other settings
+ would be silently ignored. This meant that
+ in <code>default,enabled=remove_comments</code>
+ the <code>enabled=remove_comments</code> would have no effect. As of
+ 1.9.32.1, however, it is now safe to combine <code>default</code>
+ with <code>enabled=</code>, <code>disabled=</code>,
+ or <code>options=</code>, and it indicates that the current non-experiment
+ options should be used as a starting point. For example,
+ in <code>default,enabled=remove_comments</code>, you would now get the
+ expected result of server default filters and options,
+ plus <code>remove_comments</code>. Note that <code>level=</code> may
+ still not be used with <code>default</code>.
+ <p><br>
+ While all the other settings are in the form <code>key=value</code>, as
+ in <code>percent=42</code>, this setting has no 'value' and is
+ just <code>default</code>.
+ <dt><code>level</code><dd>Set
+ the <code><a href="config_filters#level">RewriteLevel</a></code>.
+ <dt><code>enabled</code><dd>A comma-separated list of filters explicitly
+ enabled. For example, <code>enabled=rewrite_images,inline_js</code>.
+ Equivalent
+ to <code><a href="config_filters#enabling">EnableFilters</a></code>.
+ <dt><code>disabled</code><dd>A comma-separated list of filters explicitly
+ disabled. Equivalent
+ to <code><a href="config_filters#enabling">DisableFilters</a></code>.
+ <dt><code>options</code><dd>
+ A comma-separated list of options to set. For example,
+ <tt>options=JpegNumProgressiveScans=5,WebpRecompressionQuality=72</tt>.
+ <dt><code>ga_id</code><dd>The Google Analytics ID you would like the data of
+ this experiment reported to. If not specified, this experiment will use
+ the Analytics ID specified with
+ <code><a href="filter-insert-ga">AnalyticsID</a></code>.
+ <dt><code>slot</code><dd>Google Analytics provides five slots for custom
+ variables. Here you specify which custom variable slot you would
+ like to use. The default is slot 1, but you can change this setting
+ globally with:
+ <pre class="prettyprint">ExperimentVariable 2</pre>
+</dl>
+<p>
+Visitors are assigned to ExperimentSpecs on a week-to-week basis. This
+means that when you finish one experiment and start another, it will take up to
+a week for repeat visitors to be assigned to the new experiment.
+</p>
+<p>
+Starting in 1.8.31.2 you can test experiment configurations on a live site
+before assigning anyone to them by creating them initially with a percentage of
+'0%' and then visiting the page
+with <code>?PageSpeedEnrollExperiment=<experiment_id></code>. This will
+set a cookie that assigns you to the group you're trying to test. You can stop
+running this test by deleting the <code>PageSpeedExperiment</code> cookie or
+loading the page with <code>?PageSpeedEnrollExperiment=-1</code>.
+</p>
+<h2>Examples</h2>
+<p>
+Run an experiment on 30% of visitors where half get the default configuration
+and half get no filters. Use Google Analytics ID UA-XXXXXXX-Y to run the
+experiment, and default to logging the experiment information into custom
+variable slot 1:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedRunExperiment on
+ModPagespeedAnalyticsID UA-XXXXXXX-Y
+ModPagespeedExperimentSpec id=1;percent=15;default
+ModPagespeedExperimentSpec id=2;percent=15</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed RunExperiment on;
+pagespeed AnalyticsID UA-XXXXXXX-Y;
+pagespeed ExperimentSpec "id=1;percent=15;default";
+pagespeed ExperimentSpec "id=2;percent=15";</pre>
+</dl>
+<p>
+Run an experiment on 30% of visitors where:
+<ul>
+<li>One tenth of visitors get the default configuration.
+<li>One tenth get a new configuration which has the core filters
+plus <code><a href="reference-image-optimize#inline_preview_images"
+>inline_preview_images</a></code> and <code><a href="filter-comment-remove"
+>remove_comments</a></code> without <code><a href="filter-js-minify"
+>rewrite_javascript</a></code>, with <a href="restricting_urls#aris"
+>AvoidRenamingIntrospectiveJavascript</a> disabled, and a CSS inlining limit of
+4kB.
+<li>One tenth get no filters.
+<li>The remaining 70% aren't included in the experiment.
+</ul>
+All the other visitors will be unaffected. For measurement it logs to custom
+variable slot 3 of Google Analytics account UA-XXXXXXX-Y.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedRunExperiment on
+ModPagespeedAnalyticsID UA-XXXXXXX-Y
+ModPagespeedExperimentVariable 3
+ModPagespeedExperimentSpec id=3;percent=10;default
+ModPagespeedExperimentSpec id=4;percent=10;level=CoreFilters;enabled=inline_preview_images,remove_comments;disabled=rewrite_javascript;options=AvoidRenamingIntrospectiveJavascript=off,CssInlineMaxBytes=4096
+ModPagespeedExperimentSpec id=5;percent=10</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed RunExperiment on;
+pagespeed AnalyticsID UA-XXXXXXX-Y;
+pagespeed ExperimentVariable 3;
+pagespeed ExperimentSpec "id=3;percent=10;default";
+pagespeed ExperimentSpec "id=4;percent=10;level=CoreFilters;enabled=inline_preview_images,remove_comments;disabled=rewrite_javascript;options=AvoidRenamingIntrospectiveJavascript=off,CssInlineMaxBytes=4096";
+pagespeed ExperimentSpec "id=5;percent=10";</pre>
+</dl>
+<p>
+While the RunExperiment feature supports testing many changes, as shown above,
+the discipline of changing only one variable at a time helps you see the effect
+and know where it's coming from. The only drawback is that sometimes two
+filters are more useful in combination, such as minification and inlining, where
+minifying brings resources down to the inlining threshold.
+</p>
+<p>
+There is also a tradeoff with the experiment percentages: a larger percentage
+means you will collect sufficient data for meaningful results more quickly but
+it also affects more of your users. If you're
+<a href="experiment.html">testing manually</a> with query parameters to be sure
+your settings aren't making things worse for you, the downside of running with
+large experiment percentages is low. While you may not have determined the
+ideal settings right away, you're unlikely to have made things much worse.
+</p>
+
+<h2>Reporting</h2>
+<p>
+After you have been running an experiment for 24 hours Analytics will have
+results for you. The screenshots below walk through the process of creating a
+custom report to view them.
+<p>
+<ol>
+<li><h3>Set up advanced segments</h3>
+ <ol type="a">
+ <li>Advanced segments let you label fractions of your traffic. To view speed
+ results broken down by experiments you need to add segments for
+ each experimental group. Click <a target="_blank"
+ href="https://www.google.com/analytics/web/permalink?type=advanced_segment&uid=16TeL7ueRGuGttAzoYeV3A">here</a>
+ to import a segment for a sample experimental group.
+ <li>If prompted, log into Google Analytics:
+ <div><img class="experiment-screenshot"
+ alt="Google Analytics login screen."
+ src="analytics_screenshots/1_login.png"></div>
+ <li>Select the profile that your experiment data was collected under, enter
+ a name for the segment, and click <strong>Create Advanced
+ Segment</strong>:
+ <div><img class="experiment-screenshot"
+ alt="Import advanced segment screen."
+ src="analytics_screenshots/2_import_advanced_segment.png">
+ </div>
+ <li>On the next screen you can adjust this custom segment to fit your
+ situation. If you used a custom variable slot other than the default,
+ which is 1, change <strong>Custom Variable (Key 1)</strong>
+ and <strong>Custom Variable (Value 01)</strong> to the appropriate values.
+ Where it says <strong>Experiment: 1</strong> replace 1 with the experiment
+ id you used. You also need to change <strong>FuriousState</strong> (our
+ initial code name) to <strong>ExperimentState</strong>.
+
+ <div><img class="experiment-screenshot"
+ alt="Advanced segment settings."
+ src="analytics_screenshots/3_segment_settings.png">
+ </div>
+ <li>Click <strong>Save Segment</strong>.
+ <li>Repeat these steps for the rest of your experiment ids.
+ </ol>
+<li><h3>Add advanced segments to the speed report</h3>
+ <ol type="a">
+ <li>Click <strong>All Accounts</strong>.
+ <li>On the dropdown menu click the name for your profile. In the screenshot
+ below this is labeled <strong>your profile name [DEFAULT]</strong>.
+ <div><img class="experiment-screenshot"
+ alt="Profile switching dropdown."
+ src="analytics_screenshots/4_profile_switch.png">
+ </div>
+ <li>Click <strong>Standard Reporting</strong>:
+ <div><img class="experiment-screenshot"
+ alt="After profile switching."
+ src="analytics_screenshots/5_profile_switched.png">
+ </div>
+ <li>Click <strong>Content</strong>
+ <div><img class="experiment-screenshot"
+ alt="Standard reporting screen."
+ src="analytics_screenshots/6_standard_reporting.png">
+ </div>
+ <li>Under <strong>Content</strong> click <strong>Site
+ Speed</strong> and then <strong>Page Timings</strong> to bring up
+ the <strong>Site Speed Page Timings</strong> page:
+ <div><img class="experiment-screenshot"
+ alt="Page timings screen."
+ src="analytics_screenshots/7_page_timings.png">
+ </div>
+ <li>Click <strong>Advanced Segments</strong>.
+ <li>Under <strong>Custom Segments</strong> you will see the segments you added
+ above. Check the boxes next to them and click <strong>Apply</strong>:
+ <div><img class="experiment-screenshot"
+ alt="Advanced segment selection screen."
+ src="analytics_screenshots/8_advanced_segments.png">
+ </div>
+ <li>This takes you to back to the <strong>Site Speed Page Timings</strong>
+ page.
+ </ol>
+<li><h3>Examine experimental results</h3>
+ <ol type="a">
+ <li>The <strong>Explorer</strong> tab shows average timing
+ information both overall and, below, per-url:
+ <div><img class="experiment-screenshot"
+ alt="Explorer tab."
+ src="analytics_screenshots/9_page_level_timings.png">
+ </div>
+ <li>Averages can be misleading, however, because one user who suffers
+ abnormally high latency before the onload event will have an outsize
+ effect on the average. Unless your sample is very large, such users can
+ make an experiment falsely appear to be a success or failure. To overcome
+ this problem a histogram is helpful. Click
+ the <strong>Performance</strong> tab to see page load times grouped into
+ intervals.
+ <div><img class="experiment-screenshot"
+ alt="Performance tab."
+ src="analytics_screenshots/10_histogram.png">
+ </div>
+ <li>To see more fine grained timing detail, click the <strong>+</strong> icon
+ next to any histogram interval to expand it.
+ <li>In this experiment PageSpeed appears to have moved about 8% of visits
+ from the 1-3 second category to the 0-1 second one. For a simple
+ mostly-text site running only the core set of filters, this is a
+ reasonable result. As a next step the webmaster of this site might
+ examine the <a href="config_filters">filter list</a> to determine if there
+ are filters that are not in the core set which might be good targets for
+ future experimentation.
+ </ol>
+</ol>
+
+<h2 id="content-experiments"
+ >Integration with Google Analytics Content Experiments</h2>
+<p class="note"><strong>Note: New feature as of 1.10.33.0</strong></p>
+
+<p>
+The usage described above reports experiment results to a custom variable in
+Google Analytics. As of 1.10.33.0 PageSpeed supports reporting experiment
+results to a GA Content Experiment. To do this, set up a
+<a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/experiments#pro-server">server-side
+content experiment</a>. When setting this up GA will tell you an "Experiment
+ID" (which PageSpeed calls <code>ContentExperimentID</code>) and, for each
+variation, a "Chosen Variation Index" (which PageSpeed
+calls <code>ContentExperimentVariantID</code>). Tell PageSpeed about these via
+the <code>options=</code> parameter in the <code>ExperimentSpec</code>:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedExperimentSpec id=1;percent=15;options=ContentExperimentID=ID:ABC123,ContentExperimentVariantID=1;default
+ModPagespeedExperimentSpec id=2;percent=15;options=ContentExperimentID=ID:ABC123,ContentExperimentVariantID=2</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed ExperimentSpec "id=1;percent=15;options=ContentExperimentID=ID:ABC123,ContentExperimentVariantID=1;default";
+pagespeed ExperimentSpec "id=2;percent=15;options=ContentExperimentID=ID:ABC123,ContentExperimentVariantID=2";</pre>
+</dl>
+
+<p>
+While you can use the Content Experiment integration with
+either <code>ga.js</code> or <code>analytics.js</code> we recommend
+using <code>analytics.js</code> if possible. Not only is <code>ga.js</code>
+obselete, with Content Experiments it requires PageSpeed to insert a blocking
+script, which slows down your page.
+</p>
+
+<h2>Technical Implementation</h2>
+<p>
+When a visitor first arrives on a site with this feature enabled PageSpeed
+chooses an experiment from among the ExperimentSpecs. If you are running your
+experiments on less than 100% of your visitors, some will be assigned to "no
+experiment", which PageSpeed represents as <code>id=0</code>. It generates the
+page in accordance with the ExperimentSpec and then sets a cookie valid for one
+week, so that on future page loads it knows which ExperimentSpec to apply to
+this visitor:
+</p>
+<pre>
+ Date: Thu, 10 May 2012 14:19:43 GMT
+ Server: Apache/2.2.14 (Ubuntu)
+ Accept-Ranges: bytes
+ Set-Cookie: PageSpeedExperiment=3; Expires=Thu, 17 May 2013 14:19:43 GMT; Domain=.www.example.com; Path=/
+</pre>
+You can test this on your site with the <code>curl</code> program:
+<pre>
+ $ curl -D- -o /dev/null http://yoursite
+ ...
+ Set-Cookie: PageSpeedExperiment=1; ...
+ ...
+ X-Mod-Pagespeed: ...
+ ...
+</pre>
+<p>
+If you don't see a <code>Set-Cookie</code> header in the output, this feature
+isn't set up properly. If you don't see an <code>X-Mod-Pagespeed</code> header
+(Apache) or an <code>X-Page-Speed</code> header (Nginx), PageSpeed isn't running
+at all. On each page PageSpeed adds some JavaScript to set a Google Analytics
+custom variable:
+</p>
+<pre class="prettyprint">
+ _gaq.push(['_setCustomVar', 1, 'ExperimentState', 'Experiment: 4']);
+</pre>
+<p>
+While it does try to detect when a page already is using Google Analytics and
+add to it only what it needs, this is imprecise and can get it wrong. We
+recommend that you let PageSpeed insert the only snippet. If you need to
+call <a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/">other
+tracking methods</a>, for example to set
+the <a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setSampleRate">sample
+rate</a> for your site, you can do this by adding to the <code>_gaq</code> array
+within <code><head></code>. The code to do this for setting the site
+sampleRate to 80% would be:
+<pre class="prettyprint">
+ _gaq = _gaq || [];
+ _gaq.push(['_setSampleRate', '80']);
+</pre>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/openssl-1.0.1h-fixes.html b/doc/openssl-1.0.1h-fixes.html
new file mode 100644
index 0000000..3291bb3
--- /dev/null
+++ b/doc/openssl-1.0.1h-fixes.html
@@ -0,0 +1,71 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>mod_pagespeed and ngx_pagespeed Security Advisory: SSL fetching man-in-the-middle attack.</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>mod_pagespeed and ngx_pagespeed Security Advisory: SSL fetching man-in-the-middle attack.</h1>
+<dl>
+ <dt>Disclosed:</dt>
+ <dd><p>June 17th, 2014</p></dd>
+ <dt>Versions Affected:</dt>
+ <dd>
+ <ul>
+ <li>mod_pagespeed 1.7.30.1 through 1.7.30.4 (fixed in 1.7.30.5)</li>
+ <li>mod_pagespeed and ngx_pagespeed 1.8.31.1 through 1.8.31.3 (fixed in 1.8.31.4)</li>
+ </ul>
+ </dd>
+ <dt>Summary:</dt>
+ <dd><p>Some versions of mod_pagespeed and ngx_pagespeed, in order to
+ support fetching of HTTPS content, link in versions of OpenSSL
+ that are vulnerable to a man-in-the-middle attack. This attack permits
+ an adversary that can monitor and alter traffic between a client
+ (mod_pagespeed or ngx_pagespeed in this case) and a server to decrypt
+ and modify encrypted transfers, as long as both are running vulnerable
+ versions (see <a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0224">
+ CVE-2014-0224</a> for more detail).
+ </p>
+ <p>
+ mod_pagespeed and ngx_pagespeed users are only vulnerable if they turn
+ on the optional <code>FetchHttps</code> feature.
+ </p></dd>
+ <dt>Solution:</dt>
+ <dd><p>For mod_pagespeed, update to one of versions 1.7.30.5-stable,
+ 1.8.31.4-beta or newer.</p>
+
+ <p>For ngx_pagespeed, update to 1.8.31.4-beta or newer.</p>
+ </dd>
+ <dt>Workaround:</dt>
+ <dd>
+ <p>Use a method other than <code>FetchHttps</code> to fetch https content,
+ as described in <a href="https_support">HTTP Support</a> documentation.
+ </p>
+ </dd>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/optimize-for-bandwidth.html b/doc/optimize-for-bandwidth.html
new file mode 100644
index 0000000..0a5acba
--- /dev/null
+++ b/doc/optimize-for-bandwidth.html
@@ -0,0 +1,132 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Optimizing For Bandwidth</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Optimizing For Bandwidth</h1> <p>
+ PageSpeed's default <code>RewriteLevel</code> of
+ <a href="config_filters#level">CoreFilters</a>
+ is designed to reduce latency, incurring a small risk of page breakage.
+ A related goal, bandwidth reduction, can be achieved with close to zero
+ risk of web-site breakage:</p>
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedRewriteLevel OptimizeForBandwidth</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed RewriteLevel OptimizeForBandwidth;</pre>
+ </dl>
+ <p>
+ This option is suitable for use in a root configuration at a
+ hosting service, CDN, or multi-site setup, in conjunction with
+ <a href="configuration#virtual-hosts">InheritVhostConfig</a>.
+ In this mode, PageSpeed does not alter HTML at all. It compresses
+ and transcodes images <a href="system#ipro">in place</a>, and minifies
+ JavaScript and CSS. By avoiding changes to URL syntax and to HTML, the
+ potential problem of user-written JavaScript encountering unexpected
+ DOM elements is elimimated. There is still latency benefit due to the
+ reduced size of resources, as well as substantial bandwidth reduction.
+ </p>
+ <h2 id="savings">Bandwidth Savings</h2>
+ <p>
+ The bandwidth savings resulting from this option are, of course,
+ dependent on the source site. Our tests with the default
+ settings for OptimizeForBandwidth indicate an average bandwidth
+ reduction of roughly 37% over the content of 1000 large web sites with
+ a client that is capable of displaying webp images, and 25% improvement
+ with older clients.
+ </p>
+ <h2 id="adding_options">Adding Additional Options</h2>
+ <p>
+ Additional latency optimizations that modify HTML can be layered on
+ top of <code>OptimizeForBandwidth</code> by enabling additional
+ filters, and altering the <a href="config_filters#preserveurls">Preserve
+ URL settings</a> for CSS, images, or JavaScript. For example, to set
+ up a shared hosting server with OptimizeForBandwidth in the root, but
+ where individual sites have added
+ <a href="filter-js-inline">inline_javascript</a>,
+ <a href="filter-lazyload-images">lazyload_images</a> and
+ <a href="filter-prioritize-critical-css">prioritize_critical_css</a>,
+ or simply turned on <a href="config_filters#level">CoreFilters</a>,
+ the following pagespeed.conf fragment may be used:
+ </p>
+ <dl>
+ <dt>Apache:</dt>
+ <dd>
+ <pre>
+ModPagespeedInheritVHostConfig on
+ModPagespeedRewriteLevel OptimizeForBandwidth
+<VirtualHost *:80>
+ ServerName prioritize_above_the_fold.example.com
+ ModPagespeedEnableFilters inline_javascript,prioritize_critical_css,inline_preview_images
+</VirtualHost>
+<VirtualHost *:80>
+ ServerName preserve_css_urls_off.example.com
+ ModPagespeedCssPreserveURLs off
+</Directory>
+<VirtualHost *:80>
+ ServerName core.example.com
+ ModPagespeedRewriteLevel CoreFilters
+</Directory></pre>
+ </dd>
+ <dt>Nginx:</dt>
+ <dd>
+ <pre>
+pagespeed RewriteLevel OptimizeForBandwidth;
+server {
+ server_name prioritize_above_the_fold.example.com
+ pagespeed EnableFilters inline_javascript,prioritize_critical_css,inline_preview_images
+}
+server {
+ server_name preserve_css_urls_off.example.com
+ pagespeed CssPreserveURLs off
+}
+server {
+ server_name core.example.com
+ pagespeed RewriteLevel CoreFilters
+}</pre>
+ </dd>
+ </dl>
+ <p>
+ In version 1.9.32.1 and later, <a href="system#ipro">In Place
+ Resource Optimization</a> is enabled by default. In earlier versions,
+ turning on OptimizeForBandwidth automatically enables In Place
+ Resource Optimization to optimize the resources without needing
+ to change their URLs. In these earlier versions, when a VirtualHost
+ overrides the <code>RewriteLevel</code> to <code>CoreFilers</code>, that
+ turns off In Place Resource Optimization, but it can be re-enabled
+ explicitly:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedInPlaceResourceOptimization on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed InPlaceResourceOptimization on;</pre>
+</dl>
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/reference-image-optimize.html b/doc/reference-image-optimize.html
new file mode 100644
index 0000000..7e9872f
--- /dev/null
+++ b/doc/reference-image-optimize.html
@@ -0,0 +1,799 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Image Filter and Option Reference</title>
+ <link rel="stylesheet" href="doc.css">
+</head>
+<body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>Image Filter and Option Reference</h1>
+<h2>Filter Reference</h2>
+
+<h3 id="convert_gif_to_png">Convert GIF to PNG</h3>
+<p>
+This filter losslessly converts GIF images to PNG, a more recent image format
+that can generally achieve higher compression than GIF. This filter only
+converts single-frame GIFs, as PNG only supports single-frame images.
+Animated GIFs can be converted to the WebP format using the
+<code>convert_to_webp_animated</code> filter.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_gif_to_png</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_gif_to_png;</pre>
+</dl>
+
+<h3 id="convert_jpeg_to_progressive">Convert JPEG to progressive</h3>
+<p>
+This filter uses progressive format to encode large (more than 10KB) JPEG
+images. Progressive format generally yields better compression for large
+images, and permits incremental display by the browser.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_jpeg_to_progressive</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_jpeg_to_progressive;</pre>
+</dl>
+
+<h3 id="convert_jpeg_to_webp">Convert JPEG to WebP</h3>
+<p>
+This filter converts JPEG to lossily-encoded WebP format if the latter is
+supported by the browser
+(see <a href="https://developers.google.com/speed/webp/faq">
+list of browsers supporting WebP</a>);
+otherwise, this filter is ignored.
+</p>
+<p>
+With this filter enabled, GIF and PNG images can also be converted to
+lossily-encoded WebP if the configuration allows them to be converted to JPEG
+(i.e., if <code>convert_gif_to_png</code> and <code>convert_png_to_jpeg</code>
+are also enabled), and if PageSpeed determines that the images are not
+sensitive to compression noise.
+</p>
+<p class="note"><strong>
+Note: Before 1.8.31.2, if <code>convert_to_webp_lossless</code> was enabled,
+GIF and PNG images were converted to losslessly-encoded WebP even if they
+could be converted to JPEG or lossily-encoded WebP.
+</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_jpeg_to_webp</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_jpeg_to_webp;</pre>
+</dl>
+
+<h3 id="convert_png_to_jpeg">Convert PNG to JPEG</h3>
+<p>
+This filter converts GIF and PNG images to JPEG if they have no transparent
+pixels and if PageSpeed determines that they are not sensitive to compression
+noise. The conversion is lossy but the optimized JPEG images are usually
+substantially smaller than the original.
+</p>
+<p class="note"><strong>
+Note: before 1.8.31.2 mod_pagespeed did not check whether the image was
+sensitive to compression noise and converted the image to JPEG as long as it
+did not have transparent pixels.
+</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_png_to_jpeg</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_png_to_jpeg;</pre>
+</dl>
+<p>
+
+<h3 id="convert_to_webp_animated">Convert to WebP animated</h3>
+<p>
+This filter converts animated GIF to animated WebP if the latter format is
+supported by the browser; otherwise, this filter is ignored. Check
+<a href=
+"https://developers.google.com/speed/webp/faq#why_should_i_use_animated_webp">
+here</a>
+for the advantages of animated WebP and a list of supporting browsers.
+</p>
+<p class="note"><strong>Note: New feature as of 1.10.33.0</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_to_webp_animated</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_to_webp_animated;</pre>
+</dl>
+
+<h3 id="convert_to_webp_lossless">Convert to WebP lossless</h3>
+<p>
+This filter converts PNG and non-animated GIF images to losslessly-encoded
+WebP if PageSpeed determines that the images are sensitive to compression
+noise and if the latter format is supported by the browser
+(see <a href="https://developers.google.com/speed/webp/faq">
+list of browsers supporting WebP</a>);
+otherwise, this filter is ignored.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters convert_to_webp_lossless</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters convert_to_webp_lossless;</pre>
+</dl>
+
+<h3 id="inline_images">Inline images</h3>
+<p>
+This filter replaces references to small images by converting them to inline
+<code>data:</code> URLs, eliminating the need to initiate new connections for
+fetching the image data.
+</p>
+<p id="inline_beacons">
+By default <code>inline_images</code> injects JavaScript that
+uses a <a href="faq#beacons">beacon</a> to report back to the server the
+images that are visible in the client's initial viewport (above-the-fold).
+It takes a few accesses of a page for the data to be reported back and
+processed but eventually the above-the-fold images will be identified and
+inlined, while below-the-fold images will not be inlined; until then all
+small images will be inlined.
+</p>
+<p>
+The use of beacons can be disabled using the
+<a href="config_filters#beacons">CriticalImagesBeaconEnabled</a> option.
+If they are disabled, <code>inline_images</code> will not inject the
+JavaScript and will revert to inlining small images.
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters inline_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters inline_images;</pre>
+</dl>
+
+<h3 id="inline_preview">Inline preview images</h3>
+<p>
+This filter replaces each image URL with an inline <code>data:</code> URL of
+reduced quality; then, after the page's onload event, loads the full-size
+images. Inlining reduced-quality images makes the page render much faster.
+As the full-size images load in later, the final experience is a fast page
+load without loss of detail.
+See <a href="filter-inline-preview-images">Inline Preview Images</a>
+for more details.
+</p>
+
+<h3 id="insert_image_dimensions">Insert image dimensions</h3>
+<p>
+This filter adds <code>width=</code> and <code>height=</code> attributes to the
+<code><img></code> tags if they are missing. Values for the
+<code>width=</code> and <code>height=</code> attributes are computed from the
+image.
+</p>
+<p>
+Note: This filter may cause stretching or shrinking distortion if you have CSS
+rules that modify an image's dimensions.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters insert_image_dimensions</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters insert_image_dimensions;</pre>
+</dl>
+
+<h3 id="recompress_images">Recompress images</h3>
+<p>
+This is a filter group consisting of
+<code>convert_gif_to_png</code>, <code>convert_jpeg_to_progressive</code>,
+<code>convert_jpeg_to_webp</code>, <code>convert_png_to_jpeg</code>,
+<code>jpeg_subsampling</code>, <code>recompress_jpeg</code>,
+<code>recompress_png</code>, <code>recompress_webp</code>,
+<code>strip_image_color_profile</code>,
+and <code>strip_image_meta_data</code>.
+</p>
+<p class="note"><strong>
+Note: before 1.11.33.0 <code>convert_png_to_jpeg</code> was not part of
+<code>recompress_images</code> and needed to be enabled separately.
+</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters recompress_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters recompress_images;</pre>
+</dl>
+
+<h3 id="recompress_jpeg">Recompress JPEG</h3>
+<p>
+This filter recompresses JPEG images. Quality for the output image is the
+minimum of the original image and that specified in the configuration.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters recompress_jpeg</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters recompress_jpeg;</pre>
+</dl>
+
+<h3 id="recompress_png">Recompress PNG</h3>
+<p>
+This filter recompresses PNG images.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters recompress_png</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters recompress_png;</pre>
+</dl>
+
+<h3 id="recompress_webp">Recompress WebP</h3>
+<p>
+This filter recompresses single-frame (non-animated) WebP images to the quality
+specified in the configuration.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters recompress_webp</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters recompress_webp;</pre>
+</dl>
+
+<h3 id="jpeg_subsampling">Reduce JPEG subsampling</h3>
+<p>
+This filter uses 4:2:0 chroma subsampling for JPEG images, wherein hue and
+saturation have only 25% as many samples as brightness. Because human vision
+is less sensitive to hue and saturation than to brightness, this subsampling
+can significantly reduce image size with little effect on perception.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters jpeg_subsampling</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters jpeg_subsampling;</pre>
+</dl>
+
+<h3 id="resize_images">Resize images</h3>
+<p>
+This filter shrinks the dimensions of an image to the <code>width=</code> or
+<code>height=</code> attribute specified in the <code><img></code> tag
+or in the inline <code>style=</code> attribute.
+</p>
+<p>
+Note: This filter always strips color profiles and metadata. The resized image
+may also be recompressed or converted to a new format and quality based on
+your configuration.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters resize_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters resize_images;</pre>
+</dl>
+
+<h3 id="resize_rendered_image_dimensions">
+Resize images to rendered dimensions
+</h3>
+<p>
+This filter shrinks images to their rendered dimensions on the web page.
+Unlike <code>resize_images</code>, it ignores any <code>width</code> and
+<code>height</code> attributes specified for the images. If the same image
+appears more than once on a page it is resized to the largest rendered
+dimensions.
+</p>
+<p>
+To report the rendered dimensions back to the server, this filter
+injects JavaScript code to your pages which <a href="faq#beacons">beacon</a>
+the sizes back. Your page needs to be visited several times before the server
+figures out the rendered dimensions. To use this filter, the
+<a href="config_filters#beacons">CriticalImagesBeaconEnabled</a> filter must
+be enabled (this is the default).
+</p>
+<p>
+Note: If both <code>resize_rendered_image_dimensions</code> and
+<code>resize_images</code> are enabled,
+<code>resize_rendered_image_dimensions</code> takes precedence.
+</p>
+<p>
+Note: This filter always strips color profiles and metadata. The resized image
+may be recompressed or converted to a new format and quality based on your
+configuration.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters resize_rendered_image_dimensions</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters resize_rendered_image_dimensions;</pre>
+</dl>
+
+<h3 id="rewrite_images">Rewrite images</h3>
+<p>
+This is a filter group that includes <code>inline_images</code>,
+<code>recompress_images</code>, <code>convert_to_webp_lossless</code>,
+and <code>resize_images</code>.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters rewrite_images</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters rewrite_images;</pre>
+</dl>
+
+<h3 id="strip_image_color_profile">Strip image color profile</h3>
+<p>
+This filter strips color profiles from images. The stripped images
+may also be recompressed or converted to a new format and quality based on
+your configuration.
+</p>
+<p>
+Note: Image resizing or format conversion always removes color profiles.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters strip_image_color_profile</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters strip_image_color_profile;</pre>
+</dl>
+
+<h3 id="strip_image_meta_data">Strip image metadata</h3>
+<p>
+This filter strips metadata, i.e., data which is not displayed, from images.
+The stripped images may also be recompressed or converted to a new format and
+quality based on your configuration.
+</p>
+<p>
+Note: Image resizing or format conversion always removes metadata.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters strip_image_meta_data</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters strip_image_meta_data;</pre>
+</dl>
+
+<h2>Option Reference</h2>
+
+<h3 id="AllowVaryOn">AllowVaryOn</h3>
+<p>
+This option controls the response headers PageSpeed may use when deciding
+how to recompress images in
+<a href="system#ipro">In-Place Resource Optimization</a> mode.
+PageSpeed uses only the specified headers to tailor the format and quality
+to the client device and then emits a <code>Vary</code> response header which
+lists the headers it actually used. If you are using a CDN or caching proxy
+in front of PageSpeed, it must support the specified headers so the optimized
+images will be cached correctly in IPRO mode.
+</p>
+<p>
+Valid values for this option are:
+</p>
+
+<ul>
+ <li>
+ <code>None</code>: This option offers the best caching but disables some
+ of PageSpeed's image optimization features, including WebP transcoding.
+ </li>
+ <li><code>Auto</code>: This is equivalent to
+ "<code>Accept</code>, <code>Save-Data</code>" when the request from your
+ user has the <code>Via</code> header (i.e., the request came through
+ a proxy), or "<code>User-Agent</code>, <code>Save-Data</code>" otherwise.
+ </li>
+ <li>
+ One or more headers from the following, separated by comma:
+ <code>Accept</code>, <code>Save-Data</code>, <code>User-Agent</code>.
+ </li>
+</ul>
+
+<p>
+The default is <code>Auto</code>.
+</p>
+<p>
+When you allow PageSpeed to vary on <code>User-Agent</code>, either directly
+or via <code>Auto</code>, PageSpeed tries all image formats and all image
+qualities that you have enabled. For example, PageSpeed uses all modes of WebP
+and qualities for small screens if they apply. However, because of the huge
+number of user-agents, allowing vary on <code>User-Agent</code> can take up
+a huge amount of disk space in a cache. Therefore, PageSpeed does not
+recommend using vary on <code>User-Agent</code> if you use a caching proxy
+or CDN.
+</p>
+<p>
+On the other hand, when you allow PageSpeed to vary on <code>Accept</code>,
+either directly or via <code>Auto</code>, PageSpeed will consider all image
+formats supported by the <code>Accept</code> header, e.g., the lossy mode of
+WebP. The <code>Accept</code> header does not indicate whether the device is a
+small screen, so the qualities for small screens will not be used.
+The <code>Accept</code> header is not enough to conclude that browser supports
+the lossless or animated mode of WebP, so they are not used.
+</p>
+<p>
+When you allow PageSpeed to vary on <code>Save-Data</code>, PageSpeed uses the
+image qualities that you set for the <code>Save-Data</code> mode if the
+request has the <code>Save-Data</code> header.
+</p>
+<p class="note"><strong>Note: new feature as of 1.11.33.0</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedAllowVaryOn headers</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed AllowVaryOn headers;</pre>
+</dl>
+
+<h3 id="CssImageInlineMaxBytes">CssImageInlineMaxBytes</h3>
+<p>
+This option sets the maximum size in bytes of any image that will be inlined
+into CSS. For inline CSS in HTML files, the value used is the smaller of
+<code>MaxBytes</code> or <code>ImageInlineMaxBytes</code>. The default value
+is 0.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCssImageInlineMaxBytes MaxBytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CssImageInlineMaxBytes MaxBytes;</pre>
+</dl>
+
+<h3 id="ImageInlineMaxBytes">ImageInlineMaxBytes</h3>
+<p>
+This option sets the maximum size in bytes of any image that will be inlined
+into an HTML file. The default value is 2048.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageInlineMaxBytes MaxBytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageInlineMaxBytes MaxBytes;</pre>
+</dl>
+
+<h3 id="JpegNumProgressiveScans">ImageJpegNumProgressiveScans</h3>
+<p>
+This option sets how many scans (how many groups to divide image data into)
+are used for progressive JPEGs. More scans allows finer granular increase of
+display quality, but at the cost of more computation. The range is 1 to 10
+and the default is 10.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageJpegNumProgressiveScans Scans</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageJpegNumProgressiveScans Scans;</pre>
+</dl>
+
+<h3 id="JpegNumProgressiveScansForSmallScreens"
+ >ImageJpegNumProgressiveScansForSmallScreens</h3>
+<p>
+This option overrides <code>ImageJpegNumProgressiveScans</code> specifically
+for mobile visitors.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageJpegNumProgressiveScansForSmallScreens Scans</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageJpegNumProgressiveScansForSmallScreens Scans;</pre>
+</dl>
+
+<h3 id="ImageLimitOptimizedPercent">ImageLimitOptimizedPercent</h3>
+<p>PageSpeed only keeps optimized images whose size after recompression is
+less than the given percent of the original image size. For example, setting
+this to 95 will retain an optimized image only if it is at least 5% smaller
+than the original image it would replace. The default value is 100, meaning
+any savings at all will cause the optimized image to be used.
+</p>
+<p>
+Note: Do not set this option to 0 to disable image optimization; disable
+<code>rewrite_images</code> or the related filters instead. If you set this
+to 0 PageSpeed will still try to compress all your images, but will throw the
+output away for showing insufficient compression gains.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageLimitOptimizedPercent Percent</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageLimitOptimizedPercent Percent;</pre>
+</dl>
+
+<h3 id="ImageLimitResizeAreaPercent">ImageLimitResizeAreaPercent</h3>
+<p>
+PageSpeed only attempts to resize images whose area in pixels after
+optimization is less than the given percent of the original image area.
+For example, setting this to 90 will only resize images if the image area
+shrinks by at least 10%. The default value is 100, meaning any shrinkage
+at all will cause an image to be resized.
+</p>
+<p>
+Note: Do not set this option to 0 to disable image resizing, as that just adds
+computational overhead during page load; disable the
+<code>resize_images</code> and
+<code>resize_rendered_image_dimensions</code> filters instead.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageLimitResizeAreaPercent Percent</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageLimitResizeAreaPercent Percent;</pre>
+</dl>
+
+<h3 id="ImageMaxRewritesAtOnce">ImageMaxRewritesAtOnce</h3>
+<p>
+This option sets the maximum number of images to optimize concurrently.
+The default value is 8.
+</p>
+<p>
+To allow optimizing an unlimited number of images concurrently, set this
+option to "-1". To stop optimizing images, instead disable
+<code>recompress_images</code> or the related filters.
+</p>
+<p>
+Note: For backward compatibility, a value of "0" is treated equivalently
+to "-1", removing the restriction on the number of concurrent image
+optimizations PageSpeed will attempt.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageMaxRewritesAtOnce NumImages</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageMaxRewritesAtOnce NumImages;</pre>
+</dl>
+
+<h3 id="ImageResolutionLimitBytes">ImageResolutionLimitBytes</h3>
+<p>
+To avoid using too much memory, PageSpeed has a limit on the size of images it
+will optimize. The limit is expressed in bytes of <em>uncompressed</em> image,
+with a default of 32 MB. PageSpeed may need four bytes to represent each pixel,
+so divide by four to compute how many pixels that is. This means with the
+default settings the largest images PageSpeed will try to optimize are ones
+with 8 million pixels (8MP). You can calculate the total number of pixels in
+an image by multiplying its width and height. For example, a 2000x4000 image
+is 8MP. If you have images that are larger than this limit, and you're
+comfortable allowing PageSpeed to use the memory it needs to process them,
+increase <code>ImageResolutionLimitBytes</code>. For example, to allow
+PageSpeed to process images up to 32 MP (4000x8000) you can set:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageResolutionLimitBytes 128000000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageResolutionLimitBytes 128000000;</pre>
+</dl>
+If you are not comfortable giving more memory to PageSpeed, or you only have
+a few images that are over 8MP, you might want to consider manually resizing
+the images instead. The ImageMagick
+<a href="http://www.imagemagick.org/script/convert.php">convert</a>
+command is a convenient way to do this:
+ <pre>convert -resize 8000000@\> input.jpg output.jpg</pre>
+If <code>input.jpg</code> is larger than 8MP then this command will resize it
+to just below 8MP while maintaining the aspect ratio. If the image is already
+smaller than 8MP, <code>convert</code> will leave it alone.
+</p>
+<p>
+PageSpeed also has a <a href="restricting_urls#content_length">limit on the
+maximum on-disk size of resources it is willing to optimize</a>, which as of
+1.12.34.1 defaults to 16MB. While <code>ImageResolutionLimitBytes</code> is a
+limit on the uncompressed size of images, PageSpeed will be completely bypassed
+for any object, not just images, whose on-disk size is larger than
+<code>MaxCacheableContentLength</code>. You may need to raise that limit
+as well if you want PageSpeed to optimize larger images.
+</p>
+
+<h3 id="JpegQualityForSaveData">JpegQualityForSaveData</h3>
+<p>
+This option sets the quality for JPEG images if the visitor requests to save
+data and you decide to honor it. By default, PageSpeed supports
+<code>Save-Data</code> requests. See <a href="#AllowVaryOn">AllowVaryOn</a>
+for information about how to change it. This option overrides
+<code>JpegRecompressionQuality</code>, unless it is set to -1. The default
+value is 50.
+</p>
+<p class="note"><strong>Note: new feature as of 1.11.33.0</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedJpegQualityForSaveData Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed JpegQualityForSaveData Quality;</pre>
+</dl>
+
+<h3 id="JpegRecompressionQuality">JpegRecompressionQuality</h3>
+<p>
+This option sets the quality for JPEG images. It overrides
+<code>ImageRecompressionQuality</code>, unless it is set to -1. The default
+value is 85.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedJpegRecompressionQuality Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed JpegRecompressionQuality Quality;</pre>
+</dl>
+
+<h3 id="JpegRecompressionQualityForSmallScreens"
+ >JpegRecompressionQualityForSmallScreens</h3>
+<p>
+This option sets the quality for JPEG images for users visiting your site from
+a mobile device. It overrides <code>JpegRecompressionQuality</code>, unless it
+is set to -1. The default is 70.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedJpegRecompressionQualityForSmallScreens Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed JpegRecompressionQualityForSmallScreens Quality;</pre>
+</dl>
+
+<h3 id="NoTransformOptimizedImages">NoTransformOptimizedImages</h3>
+<p>
+By default, PageSpeed-optimized resources are served with response headers
+that allow proxies and browsers to cache them for a long time, e.g.:
+</p>
+<pre>Cache-Control: max-age=31536000</pre>
+<p>
+With these headers, proxies are free to
+<a href="http://calendar.perfplanet.com/2013/mobile-isp-image-recompression/">
+recompress images further</a>.
+This may be beneficial to the overall user experience because it can reduce
+bandwidth. However, if you already use PageSpeed to compress images as much
+as you're comfortable with, then you can prevent compliant proxies from
+further recompressing them by turning on this feature, resulting in responses
+with header:
+<pre>Cache-Control: max-age=31536000,no-transform</pre>
+</p>
+<p class="note"><strong>Note: new feature as of 1.9.32.1</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedNoTransformOptimizedImages on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed NoTransformOptimizedImages on;</pre>
+</dl>
+
+<h3 id="ProgressiveJpegMinBytes">ProgressiveJpegMinBytes</h3>
+<p>
+Progressive JPEG offers better compression for large images, while
+non-progressive JPEG does better for small images. This option sets the
+cut-off position for the use of these two formats.
+</p>
+<p>
+Note: PageSpeed predicts the size of the final compressed JPEG image and then
+compares the predicted size with this option to determine whether to use
+progressive format. Due to the accuracy of prediction, some optimized images
+that are encoded in non-progressive format might be larger than this option,
+or vice versa.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedProgressiveJpegMinBytes min_bytes</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ProgressiveJpegMinBytes min_bytes;</pre>
+</dl>
+
+<h3 id="ImageRecompressionQuality">ImageRecompressionQuality</h3>
+<p>
+This option sets the quality for JPEG and WebP formats. It can be overridden
+by any format-specific or application-specific quality. The default is 85.
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImageRecompressionQuality Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImageRecompressionQuality Quality;</pre>
+</dl>
+
+<h3 id="serve_webp_urls">ServeRewrittenWebpUrlsToAnyAgent</h3>
+<p>
+When PageSpeed rewrites an <code><img></code> tag in HTML or a
+<code>background-url</code> in CSS in response to a request from a
+WebP-capable browser, it may transcode the image to WebP format and
+rewrites the URL using a <code>.webp</code> extension. If a site visitor
+copies the <code>.webp</code> image URL and shares it, only WebP-capable
+browsers will be able to display the image. Sites that place a high value
+on such URL sharing can make PageSpeed serve PNG/JPEG on <code>.webp</code>
+URLs by disabling the option
+<code>ServeRewrittenWebpUrlsToAnyAgent</code>:
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedServeRewrittenWebpUrlsToAnyAgent off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ServeRewrittenWebpUrlsToAnyAgent off;</pre>
+</dl>
+<p>
+The default value of <code>ServeRewrittenWebpUrlsToAnyAgent</code>
+is <code>on</code> because some proxy caches strip the
+<code>User-Agent</code> and <code>Accept</code> headers when transmitting
+requests for resources to origin. In that scenario, PageSpeed cannot determine
+whether the browser requesting the image can display WebP images. Thus it is
+not possible to have all three of these features at the same time:
+</p>
+<ul>
+ <li>
+ Provide the best possible bandwidth and latency experience for visitors
+ using modern browsers
+ </li>
+ <li>
+ Enable the sharing of URLs between visitors and their friends using older
+ browsers
+ </li>
+ <li>
+ Use a proxy cache that strips <code>User-Agent</code> and
+ <code>Accept</code> headers
+ </li>
+</ul>
+<p>
+If the first two features are important, the site should use proxy cache
+technology or CDNs that do not strip <code>User-Agent</code> and
+<code>Accept</code>. Be sure to check with your proxy cache or CDN vendor to
+understand their policy on transmitting these headers.
+</p>
+
+<h3 id="WebpAnimatedRecompressionQuality">WebpAnimatedRecompressionQuality</h3>
+<p>
+This option sets the quality for animated WebP images. It overrides
+<code>WebpRecompressionQuality</code> and applies to users from both mobile
+and non-mobile devices, unless it is set to -1. The default is 70.
+</p>
+<p class="note"><strong>Note: new feature as of 1.10.33.0</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedWebpAnimatedRecompressionQuality Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed WebpAnimatedRecompressionQuality Quality;</pre>
+</dl>
+
+<h3 id="WebpQualityForSaveData">WebpQualityForSaveData</h3>
+<p>
+This option sets the quality for WebP images if both your site and your
+user have agreed to use save-data. See <a href="#AllowVaryOn">AllowVaryOn</a>
+to learn how to enable save-data. This option overrides
+<code>WebpRecompressionQuality</code>
+and <code>ModPagespeedWebpAnimatedRecompressionQuality</code>, unless it is set
+to -1. The default value is 50.
+</p>
+<p class="note"><strong>Note: new feature as of 1.11.33.0</strong></p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedWebpQualityForSaveData Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed WebpQualityForSaveData Quality;</pre>
+</dl>
+
+<h3 id="WebpRecompressionQuality">WebpRecompressionQuality</h3>
+<p>
+This option sets the quality for WebP images. It overrides
+<code>ImageRecompressionQuality</code>, unless it is set to -1. The default
+value is 80.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedWebpRecompressionQuality Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed WebpRecompressionQuality Quality;</pre>
+</dl>
+
+<h3 id="WebpRecompressionQualityForSmallScreens"
+ >WebpRecompressionQualityForSmallScreens</h3>
+<p>
+This option sets the quality for WebP images for users visiting your site from
+a mobile device. It overrides <code>WebpRecompressionQuality</code>,
+unless it is set to -1. The default is 70.
+</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedWebpRecompressionQualityForSmallScreens Quality</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed WebpRecompressionQualityForSmallScreens Quality;</pre>
+</dl>
+
+</div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/release_notes.html b/doc/release_notes.html
new file mode 100644
index 0000000..c1f544e
--- /dev/null
+++ b/doc/release_notes.html
@@ -0,0 +1,4709 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed Release Notes</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+ <h1>PageSpeed Release Notes</h1>
+
+ <h2 id="release_1.13.35.2-stable">Release 1.13.35.2-stable</h2>
+ <p>
+ This release made February 5, 2018. It is a clone of
+ the <a href="#release_1.13.35.2-beta">1.13.35.2-beta</a> release.
+ </p>
+
+ <h2 id="release_1.13.35.2-beta">Release 1.13.35.2-beta</h2>
+ <p>This release was made January 10, 2018.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1514">
+ #1514</a></strong>
+ Reliability fix for handling srcset attributes.</li>
+ </ul>
+ <h4 class="hide-from-toc">Issues Affecting only Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1503">
+ #1503</a></strong>
+ CentOS 6: error: 'F_SETPIPE_SZ' was not declared in this scope .</li>
+ </ul>
+ <h2 id="release_1.13.35.1-beta">Release 1.13.35.1-beta</h2>
+ <p>This release was made November 8, 2017.</p>
+
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="configuration#honor-csp">Content Security Policy Support</a></dt>
+ <dd>
+ Opt-in feature enabling optimizations to adapt to Content Security Policies.
+ </dd>
+ <dt><a href="system#redis">Support specifying a Redis Database</a></dt>
+ <dd>
+ It is now possible to specify which database will be used when configuring Redis as a
+ cache.
+ </dd>
+ <dt><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=649264">Sync with WebP change in Chromium</a></dt>
+ <dd>
+ <p>
+ The webp decoder is being updated to correct an issue where it can't play an animation exactly once,
+ and requires an encoder update.
+ </p>
+ Background:
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1294490">Mozilla WebP Bug</a></li>
+ <li><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=649264">Chrome WebP Bug</a></li>
+ <li><a href="https://groups.google.com/a/webmproject.org/forum/#!msg/webp-discuss/rJ2a0j1BNQI/XXqK918ZEQAJ">WebM discussion</a></li>
+ </ul>
+ </dd>
+ <dt><a href="faq#warning-fetch-rate">Log errors if serf error rate seems too high.</a></dt>
+ <dd>
+ When over 50% of http fetch attempts inside a 30-minute period fail, pagespeed will now emit
+ an error entry to the logs.
+ </dd>
+ <dt><a href="configuration#on_off">Off</a> has been replaced by <a href="configuration#standby">Standby</a></dt>
+ <dd>
+ In standby mode PageSpeed is off, except it serves .pagespeed. resources and
+ PageSpeed query parameters are interpreted. This is equivalent to "off" in
+ mod_pagespeed. Previously, ngx_pagespeed had no equivalent.
+
+ With this change, "off" in mod_pagespeed is deprecated, and "standby" should be used instead.
+ </dd>
+ <dt><a href="https://github.com/apache/incubator-pagespeed-mod/issues/1308"
+ >Allow UrlValuedAttribute:image on elements with children</a></dt>
+ <dd>
+ Tags that have children are now considered acceptable targets for image optimization.
+ </dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Deprecations</h3>
+ <dl>
+ <dt><a href="configuration#standby">Standby</a> has replaced <a href="configuration#on_off">Off</a></dt>
+ <dd>Pagespeed off has been deprecated and replaced with pagespeed standby.</dd>
+ <dt>Ubuntu 12.04 end of life</dt>
+ <dd>The platform used to build .deb files has moved to Ubuntu 14.04. This introduced a dependency
+ on a glibc version which is not compatible with Ubuntu 12.04. Building from source is still possible.
+ </dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1207">
+ #1207</a></strong>
+ Don't emit type=text/javascript on script tags.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1609">
+ #1609</a></strong>
+ Specify which Redis DB to use when confiuring Redis as a caching backend.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1153">
+ #1153</a></strong>
+ Pedantic filter should prevent inlining CSS into the body.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1538">
+ #1538</a></strong>
+ CSS Minification - 0 followed by a unit is rewritten to 0 without a unit .</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1572">
+ #1572</a></strong>
+ CSS minifier breaks unicode-range values.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1585">
+ #1585</a></strong>
+ Don't special-case sending webp to PSI.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1553">
+ #1553</a></strong>
+ Debug builds may abort() when revalidating expired output resources.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1418">
+ #1418</a></strong>
+ LoadFromFileCacheTtlMs is not honored after first request.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1382">
+ #1382</a></strong>
+ In amp pages inline_google_font_css must be disabled.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1496">
+ #1496</a></strong>
+ Attempting to extend cache for SVGs returns bad headers/content.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1405">
+ #1405</a></strong>
+ ERROR: Invalid inlined_image_type in cached_result.</li>
+ </ul>
+ <h4 class="hide-from-toc">Issues Affecting only Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1380">
+ #1380</a></strong>
+ Nginx worker 100% cpu usage (spinning on write returning EAGAIN).</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1375">
+ #1375</a></strong>
+ Don't respond with an entity body to HEAD requests for html.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1465">
+ #1465</a></strong>
+ Fix ignored return code in ps_simple_handler().</li>
+ </ul>
+
+ <h2 id="release_1.12.34.3-stable">Release 1.12.34.3-stable</h2>
+ <p>
+ This nginx-only release made September 28, 2017. As of nginx 1.13.4
+ building the module would fail. This release resolves the problem.
+ </p>
+ <h4 class="hide-from-toc">Issues Affecting Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1451">
+ Issue 1451</a></strong>
+ nginx 1.13.4 "ngx_http_core_try_files_phase" was not declared in this scope
+ </li>
+ </ul>
+
+ <h2 id="release_1.12.34.2-stable">Release 1.12.34.2-stable</h2>
+ <p>
+ This release was made June 19, 2017. It is a clone of
+ the <a href="#release_1.12.34.2-beta">1.12.34.2-beta</a> release.
+ </p>
+
+ <h2 id="release_1.12.34.2-beta">Release 1.12.34.2-beta</h2>
+ <p>
+ This nginx-only bug-fix release was made December 15, 2016. It allows the
+ precompiled PSOL library to be used with nginx's <code>--with-debug</code>.
+ </p>
+ <p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1333">
+ Issue 1333</a></strong>
+ Release 1.12.34.1 not compatible with <code>--with-debug</code>
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/80c4b7e97ba90b0280255fc3967f02e02239653c"
+ ><code><small>80c4b7e9</small></code></a>)
+ </li>
+ </ul>
+
+ <h2 id="release_1.12.34.1-beta">Release 1.12.34.1-beta</h2>
+ <p>This release was made December 7, 2016.</p>
+
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="system#redis">Redis Support</a></dt>
+ <dd>
+ Support for Redis Cache and Redis Cluster as external caches.
+ </dd>
+ <dt><a href="filter-hint-preload-subresources"
+ >Add preload hints</a></dt>
+ <dd>
+ This is a new filter, off by default, that looks for declaratively
+ included stylesheets and javascript to figure out the page's dependencies,
+ and inserts <a href="http://w3c.github.io/preload">preload headers</a> so
+ the browser can start loading them immediately.
+ </dd>
+ <dt><a href="filter-image-optimize#srcsets">Optimize Srcsets</a></dt>
+ <dd>
+ PageSpeed now optimizes images referenced in <code>srcset</code>
+ attributes.
+ </dd>
+ <dt><a href="system#s-maxage">Set <code>s-maxage</code></a></dt>
+ <dd>
+ To prevent CDNs and other shared caches from caching the unoptimized
+ version of resources for a long time, PageSpeed now
+ adds <code>s-maxage=10</code> to the cache-control headers for unoptimized
+ resources that we intend to optimize <a href="system#ipro">in-place</a>.
+ </dd>
+ <dt><a href="filter-css-combine#permit-ids-for-css-combining">Allow
+ combining stylesheets with IDs</a></dt>
+ <dd>
+ PageSpeed would previously refuse to combine stylesheets with IDs, which
+ interacted poorly with WordPress and other content management systems
+ putting IDs on all their CSS files. Setting
+ <code>PermitIdsForCssCombining</code> wildcards allows you to indicate to
+ PageSpeed which IDs on CSS files are ok to ignore.
+ </dd>
+ <dt><a href="config_filters#FinderPropertiesCacheExpirationTimeMs">
+ <code>FinderPropertiesCacheExpirationTimeMs</code></a></dt>
+ <dd>
+ Configures the length of time the <a
+ href="filter-prioritize-critical-css">prioritize_critical_css</a> beacons
+ are valid.
+ </dd>
+ <dt><a href="configuration#add-resource-header">
+ <code>AddResourceHeader</code></a></dt>
+ <dd>
+ Allows setting headers on optimized resources for <a
+ href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing"
+ >CORS</a> support.
+ </dd>
+ <dt><a href="system#shm_checkpointing"
+ >Shared Memory Cache Checkpointing</a></dt>
+ <dd>
+ The shared memory metadata cache now checkpoints to disk every few minutes
+ instead of writing all changes through as they happen. In our testing
+ this improved performance on workloads that require many metadata writes
+ by 21%.
+ </dd>
+
+ </dl>
+
+ <h3 class="hide-from-toc">Deprecations</h3>
+ <dl>
+ <dt><a href="configuration#virtual-hosts"
+ >Support for disabling <code>InheritVHostConfig</code></a></dt>
+ <dd>
+ For historical reasons, mod_pagespeed on Apache doesn't respect the global
+ PageSpeed configuration when interpreting VHost configuration. Since
+ 1.1 in 2012, however, it has shipped with a default configuration file
+ that fixed this by setting <code>InheritVHostConfig</code> to "on". For
+ the minority of installations that don't use the default configuration
+ file, or explicitly set <code>InheritVHostConfig</code> to "off",
+ PageSpeed will now log an error on startup warning that the setting will
+ soon change. With the next major version
+ release <code>InheritVHostConfig</code> will be forced to "on".
+ </dd>
+ <dt>Centos 5 Support</dt>
+ <dd>
+ CentOS 5, released in 2007, goes end-of-life at the end
+ of <a
+ href="https://wiki.centos.org/FAQ/General#head-fe8a0be91ee3e7dea812e8694491e1dde5b75e6d"
+ >March 2017</a>. The 1.12 rpm packages are for CentOS 6 and later, and
+ will fail to install on CentOS 5. The stable release track, 1.11,
+ continues to support CentOS 5.
+ </dd>
+ </dl>
+
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1127">
+ Issue 1127</a></strong>
+ Don't accumulate waveforms that won't be displayed</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1263">
+ Issue 1263</a></strong>
+ Minimal <a href="https://www.ampproject.org/">AMP</a> support: don't
+ invalidate AMP</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1321">
+ Issue 1321</a></strong>
+ <a href="system#ipro">IPRO</a> can change the content types of JavaScript
+ resources</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1337">
+ Issue 1337</a></strong>
+ Multiple instances of the <a href="system#file_cache">cache cleaner</a>
+ can run simultaneously on large caches</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1350">
+ Issue 1350</a></strong>
+ <a href="filter-domain-rewrite">rewrite_domains</a> doesn't apply to
+ <a href="configuration#pagespeed_static">static assets</a></li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1373">
+ Issue 1373</a></strong>
+ <a href="configuration#respectvary">RespectVary</a> ignored when
+ cache-extending</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1386">
+ Issue 1386</a></strong>
+ <a href="domains#ModPagespeedLoadFromFile">LoadFromFile</a> crashes on
+ resources too big for memory</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1405">
+ Issue 1405</a></strong>
+ Unexpected tag <head/> inside pages</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1409">
+ Issue 1409</a></strong>
+ <a href="system#ipro">IPRO</a> Records Resources of Unoptimizable Content
+ Types</li>
+ </ul>
+
+ <h2 id="release_1.11.33.5-stable">Release 1.11.33.5-stable</h2>
+ <p>
+ This bug-fix release was made November 14, 2016. It is a clone
+ of the <a href="#release_1.11.33.5-beta">1.11.33.5-beta</a> release and
+ rebuilds the <code>.deb</code> packages to fix auto-updating for Ubuntu
+ 16.10.
+ </p>
+ <p>
+ This release is only applicable to Debian and Ubuntu;
+ release <a href="release_1.11.33.4-stable">1.11.33.4</a> is
+ still the most up-to-date stable release for RedHat, CentOS, PSOL, and
+ ngx_pagespeed.
+ </p>
+
+ <h2 id="release_1.11.33.5-beta">Release 1.11.33.5-beta</h2>
+ <p>
+ This bug-fix release was made November 14, 2016. It rebuilds
+ the <code>.deb</code> packages to fix auto-updating for Ubuntu 16.10.
+ </p>
+ <p>
+ This release is only applicable to Debian and Ubuntu;
+ release <a href="release_1.11.33.4-beta">1.11.33.4</a> is
+ still the most up-to-date beta release for RedHat, CentOS, PSOL, and
+ ngx_pagespeed.
+ </p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1428">
+ Issue 1428</a></strong>
+ Auto-updating broken with new <code>.deb</code> systems
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/36d4a38005b9c355d376b9866b71ede0a96be744"
+ ><code><small>36d4a38</small></code></a>)
+ </li>
+ </ul>
+
+ <h2 id="release_1.11.33.4-stable">Release 1.11.33.4-stable</h2>
+ <p>
+ This release was made October 3, 2016. It is a clone of
+ the <a href="#release_1.11.33.4-beta">1.11.33.4-beta</a> release.
+ </p>
+ <p>
+ In addition to being the latest stable release for Apache, this is the first
+ stable release for Nginx.
+ </p>
+
+ <h2 id="release_1.11.33.4-beta">Release 1.11.33.4-beta</h2>
+ <p>This bug-fix release was made September 15, 2016.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1392">
+ Issue 1392</a></strong>
+ and <strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1393">
+ Issue 1393</a></strong>
+ All existing preload hints are stripped
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/95ef580465d9ac9dbbe95d0e3c8ae4fd1292aac6"
+ ><code><small>95ef580</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1396">
+ Issue 1396</a></strong>
+ Can't build from source because Chromium svn is gone
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/3f47828ca7eeb0611b5f2226016631edc42d1e90"
+ ><code><small>3f47828</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/commit/269ed10ed56230d7b83bdb81e6b7cc1deaf3227f"
+ ><code><small>269ed10</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1397">
+ Issue 1397</a></strong>
+ ImageMaxRewritesAtOnce of -1 should allow unlimited image rewrites
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/18d5549d7be6f857e2deb3285a67f6f3cd3f40ef"
+ ><code><small>18d5549</small></code></a>)
+ </li>
+ </ul>
+
+ <h2 id="release_1.11.33.3-beta">Release 1.11.33.3-beta</h2>
+ <p>This bug-fix release was made August 16, 2016.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1149">
+ Issue 1149</a></strong>
+ PageSpeed output resources cannot be cached in Google Cloud
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/f56391f87eea004ed8f7a8f8288162d8d7f26e8c"
+ ><code><small>f56391</small></code></a>)
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/9711b52270ff23293180820b2e4f4fb3befc3c01"
+ ><code><small>9711b5</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1192">
+ Issue 1192</a></strong>
+ Cache-purging does not work for in-place resource optimization
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/d1972f66f65a20624826362d7e2838dc91f59c95"
+ ><code><small>d1972f</small></code></a>)
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/07a6647b6544d91da93630484f2cbff196bc0f70"
+ ><code><small>07a664</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/674">
+ Issue 674</a></strong>
+ Serf spin causes 100% CPU usage
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/921fd719a1c762daae9aaa28d8b87e6c27497731"
+ ><code><small>921fd7</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1022">
+ Issue 1022</a></strong>
+ image-inline: don't inline shortcut images
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/203865af81afe5ee6c18f555a4d4ebfb2f0da607"
+ ><code><small>203865</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1324">
+ Issue 1324</a></strong>
+ Support UrlValuedAttribute with CSS
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/59a198284e82bccb303d7e27705bcd3dbd22eda3"
+ ><code><small>59a1982</small></code></a>)
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/787239d42940c53a78bc3646c689c8e399eebc2e"
+ ><code><small>787239</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1054">
+ Issue 1054</a></strong>
+ defer_js loads javascript twice
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/e2aa6f4f75442770c373e6ce3694dbbb5a9313c3"
+ ><code><small>e2aa6f</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1327">
+ Issue 1327</a></strong>
+ Remove rel=preload hints which wastefully download unused resources when using PageSpeed
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/dbde98953a796e16fee3fa9afe8c3af444d9e242"
+ ><code><small>dbde98</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1305">
+ Issue 1305</a></strong>
+ ImageMaxRewritesAtOnce ignored (but displays correct configured value in admin interface)
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/19cf3bb60b2aadff90ec588aab780e72daf0b581"
+ ><code><small>19cf3b</small></code></a>)
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/e0a3bf223a6ea4914c1d34944f94c8aef8ef0db7"
+ ><code><small>e0a3bf</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1220">
+ Issue 1311</a></strong>
+ ngx_pagespeed crashes on start if there is no http block in config
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/ff8969770d2914a4ffa8473b019ad743e1a84652"
+ ><code><small>ff8969</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1338">
+ Issue 1338</a></strong>
+ Recognize dc.js as a synonym for ga.js
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/1ff43e196a7d0b1c9b27387ae0beef6e374cea51"
+ ><code><small>1ff43e</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1307">
+ Issue 1307</a></strong>
+ Don't mangle files that start with the gzip magic bytes
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/6dfe527c0f6f30bdf438de61e2cff1eb33817b0b"
+ ><code><small>6dfe52</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1294">
+ Issue 1294</a></strong>
+ PageSpeed URL control wildcards don't work properly
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0654743c1fdbf5b85a62a4dc1d19a1c06a20afd8"
+ ><code><small>065474</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1348">
+ Issue 1348</a></strong>
+ Insert dns-prefetch for safari
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/d05a8b6e75eb5fc7ee7105abedf6189af7308896"
+ ><code><small>d05a8b</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1222">
+ Issue 1222</a></strong>
+ Pagespeed eats CSS font-face declarations when defined in imported files
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/8fca3b9d3b606cbd83ae34f09c9564be16831862"
+ ><code><small>8fca3b</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1343">
+ Issue 1343</a></strong>
+ allow people to turn off cache cleaning
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/ccea83faf5be53690e3865d06d2cbbb97bf0c05d"
+ ><code><small>ccea83</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1371">
+ Issue 1371</a></strong>
+ PageSpeed can serve gzipped content without Content-Encoding header via IPRO
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0bd84a160119f6e2dc04ec22e6b09907e875cdb9"
+ ><code><small>0bd84a</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1190">
+ Issue 1190</a></strong>
+ Adding ?PageSpeedFilters=+debug to URL enables other filters
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/2a3b1278dfe0482ab59df663f40e65c3f5432441"
+ ><code><small>2a3b12</small></code></a>)
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/2af2035bbd8979744aaf5a7fbd24c3192933f186"
+ ><code><small>2af203</small></code></a>)
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1369">
+ Issue 1369</a></strong>
+ dedup_inline_images filter is broken for images that don't already have an id
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/c1827bb0be7fb9b4696baa97c978012b8e869dc9"
+ ><code><small>c1827b</small></code></a>)
+ </li>
+ </ul>
+
+ <h2 id="release_1.11.33.2-stable">Release 1.11.33.2-stable</h2>
+ <p>
+ This release was made May 12, 2016. It is a clone of the
+ 1.11.33.2-beta release.
+ </p>
+
+ <h2 id="release_1.11.33.2-beta">Release 1.11.33.2-beta</h2>
+ <p>This security update release was made May 12, 2016.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://www.openssl.org/news/secadv/20160503.txt">
+ https://www.openssl.org/news/secadv/20160503.txt</a></strong>
+ </li>
+ </ul>
+
+ <h2 id="release_1.11.33.1-stable">Release 1.11.33.1-stable</h2>
+ <p>This bug-fix release was made May 2nd, 2016. It is a clone of the
+ 1.11.33.1-beta release.
+ </p>
+ <p>This release depends on glibc >= 2.14 and will no longer run on Debian
+ Wheezy, (7.0) which is also no longer officially supported by the Debian
+ security team.
+ </p>
+
+ <h2 id="release_1.11.33.1-beta">Release 1.11.33.1-beta</h2>
+ <p>This bug-fix release was made May 2nd, 2016.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1288">
+ Issue 1288</a></strong>
+ Experiment reporting broken with ga.js
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/65067523faf34833cfda8ae5c5e10b5f7ba5497f"
+ ><code><small>650675</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1219">
+ Issue 1298</a></strong>
+ Experiment injection for GA tracker always sets variation 1
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/a2b10e49318ea9d8e2ecf26e2c562bc427a06e99"
+ ><code><small>a2b10e4</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.11.33.0-beta">Release 1.11.33.0-beta</h2>
+ <p>This release was made March 30, 2016.</p>
+
+ <p>
+ This release targets users on mobile devices and low-bandwidth networks by
+ adding Save-Data support. Save-Data is a new Client Hint that allows site
+ visitors to indicate that they
+ would <a href="https://developers.google.com/web/updates/2016/02/save-data"
+ >prefer lower-quality resources in order to save data</a>. Sites are most
+ likely to see requests to save data today from visitors who have turned
+ on <a href="https://developer.chrome.com/multidevice/data-compression">Data
+ Saver mode</a> in Chrome or the equivalents in Opera and Yandex Browser,
+ often because they're on slow or expensive connections. Now, with 1.11,
+ when such a user comes to your site asking it to save data, mod_pagespeed
+ will <a
+ href="filter-image-optimize#image-quality"
+ >compress images to a lower quality level</a> than it would typically,
+ decreasing their size further at the cost of slightly more image distortion.
+ </p>
+
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="filter-image-optimize#image-quality">Save-Data Support</a></dt>
+ <dd>Serve more thoroughly compressed images to browsers that request lowered
+ data usage via client hints.</dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/973">
+ Issue 973</a></strong>
+ Strip subresource hints
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/d0bae68"
+ ><code><small>d0bae68</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/commit/08e284f"
+ ><code><small>08e284f</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1214">
+ Issue 1214</a></strong>
+ PageSpeed console blank
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/2bd239d"
+ ><code><small>2bd239d</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1276">
+ Issue 1276</a></strong>
+ CSS Parser has off-by-one heap read
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0bc4ce7"
+ ><code><small>0bc4ce7</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1277">
+ Issue 1277</a></strong>
+ Google Fonts CSS inlining broken
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/e3aa7b7"
+ ><code><small>e3aa7b7</small></code></a>)</li>
+ </ul>
+
+ <h4 class="hide-from-toc">Issues Affecting Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1064">
+ Issue 1064</a></strong>
+ Multiple Vary headers emitted (partial fix,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/commit/b081bb7"
+ ><code><small>b081bb7</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1151">
+ Issue 1151</a></strong>
+ Unclear message on ParseUrl failure
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/6634754"
+ ><code><small>6634754</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.10.33.7-beta">Release 1.10.33.7-beta</h2>
+ <p>This security update release was made March 28, 2016. It resolves the
+ same issues as the <a href="#release_1.9.32.14-stable">1.9.32.14</a> stable
+ release, and has the same patch.
+ </p>
+
+ <h2 id="release_1.9.32.14-stable">Release 1.9.32.14-stable</h2>
+ <p>This security update release was made March 28, 2016.</p>
+
+ <p>
+ All previously released versions of PageSpeed are vulnerable
+ to <a href="announce-sec-update-201603">CVE-2016-3626</a>. This permits a
+ hostile third party to trick PageSpeed into making arbitrary HTTP requests
+ on arbitrary ports and re-hosting the response, allowing cross site
+ scripting. If the machine running PageSpeed has access to services that are
+ not otherwise available, this can reveal those resources.
+ </p>
+ <p>
+ Users are <b>strongly</b> encouraged to update immediately. If this isn't
+ possible, a <a href="announce-sec-update-201603#workaround">workaround</a>
+ is available.
+ </p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="announce-sec-update-201603"
+ >announce-sec-update-201603</a></strong>
+ Fetching and XSS vulnerability. (
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/52e184b"
+ ><code><small>52e184b</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.10.33.6-beta">Release 1.10.33.6-beta</h2>
+ <p>This bug-fix release was made March 3, 2016, and is Nginx-only</p>
+ <p>
+ Several nginx-specific bug-fixes were accidentally ommitted from
+ the <a href="#release_1.10.33.5-beta">1.10.33.5</a> ngx_pagespeed release.
+ This release contains those fixes, plus an additional nginx-specific memory
+ safety fix.
+ </p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1081">
+ Issue 1081</a></strong>
+ Crashes on custom 404s for .pagespeed. resources
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/1964ef"
+ ><code><small>1964ef</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1096">
+ Issue 1096</a></strong>
+ IPRO check-fails on some connection errors
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/b88e06"
+ ><code><small>b88e06</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/commit/60c1f4"
+ ><code><small>60c1f4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1138">
+ Issue 1120</a></strong>
+ Fix shutdown when ngx_pagespeed is completely disabled.
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/f60c754"
+ ><code><small>f60c754</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1138">
+ Issue 1138</a></strong>
+ IPRO responses sometimes forward a bad cache control value
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/85d0db2"
+ ><code><small>85d0db2</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.10.33.5-beta">Release 1.10.33.5-beta</h2>
+ <p>This bug-fix release was made February 16, 2016</p>
+ <p>
+ This bug-fix release fixes several bugs in both ngx_pagespeed and
+ mod_pagespeed. The release allows ngx_pagespeed to be built as a dynamic
+ module, for compatibility with nginx version 1.9.11.
+ </p>
+ <p>
+ <b>Update 2016-03-02</b>: This release accidentally ommited fixes
+ for ngx_pagespeed issues
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1081">1081</a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1096">1096</a>,
+ and
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1099">1099</a>.
+ Release <a href="#release_1.10.33.6-beta">1.10.33.6</a> includes these
+ fixes.
+ </p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1080">
+ Issue 1080</a></strong>
+ inline_google_font_css uses .ttf instead of .woff for IE11
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/f3639e"
+ ><code><small>f3639e</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/commit/0a60e0"
+ ><code><small>1964ef</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1252">
+ Issue 1252</a></strong>
+ Images may be rewritten multiple times when requested simultaneously via
+ IPRO
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/62d24f"
+ ><code><small>62d24f</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1253">
+ Issue 1253</a></strong>
+ Tests can flake because of best effort locking
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/c368ef"
+ ><code><small>c368ef</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1254">
+ Issue 1254</a></strong>
+ Fallback value not decompressed when necessary
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/bcf63ac"
+ ><code><small>bcf63ac</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/d3851dd"
+ ><code><small>d3851dd</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1261">
+ Issue 1261</a></strong>
+ CSS minification incorrectly transforms 0% to 0
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/7c30b7"
+ ><code><small>7c30b7</small></code></a>)</li>
+ </ul>
+ <h4 class="hide-from-toc">Issues Affecting Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1229">
+ Issue 1229</a></strong>
+ pagespeed default config fails to load on 2.4 unless mod_access_compat
+ is loaded
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/02e8f7"
+ ><code><small>02e8f7</small></code></a>)</li>
+ </ul>
+ <h4 class="hide-from-toc">Issues Affecting Nginx</h4>
+ <ul>
+ <li><strike><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1081">
+ Issue 1081</a></strong>
+ Crashes on custom 404s for .pagespeed. resources</strike>
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/1964ef"
+ ><code><small>1964ef</small></code></a>)</li>
+ <li><strike><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1096">
+ Issue 1096</a></strong>
+ IPRO check-fails on some connection errors</strike>
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/b88e06"
+ ><code><small>b88e06</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/commit/60c1f4"
+ ><code><small>60c1f4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1099">
+ Issue 1099</a></strong>
+ Duplicate Location headers after 302 redirects
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/059dd2"
+ ><code><small>059dd2</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1110">
+ Issue 1110</a></strong>
+ Can't build with nginx 1.9.11+
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/daa603"
+ ><code><small>daa603</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1115">
+ Issue 1115</a></strong>
+ Can't build as a dynamic module.
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/fbde0a"
+ ><code><small>fbde0a</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.10.33.4-beta">Release 1.10.33.4-beta</h2>
+ <p>This security update release was made February 3rd, 2016. It resolves the
+ same issues as the <a href="#release_1.9.32.13-stable">1.9.32.13</a> stable
+ release, and has the same patches.
+ </p>
+
+ <h2 id="release_1.9.32.13-stable">Release 1.9.32.13-stable</h2>
+ <p>This security update release was made February 3rd, 2016.</p>
+
+ <p>
+ All previously released versions of PageSpeed are vulnerable to
+ HTTPS-fetching vulnerability CVE-2016-2092. This permits a hostile third
+ party who can man-in-the-middle the connection between PageSpeed and an
+ HTTPS server to substitute arbitrary content in responses. PageSpeed is not
+ vulnerable in its default configuration, but several filters and options
+ can enable this vulnerability. See <a href="announce-sec-update-201601">our
+ CVE-2016-2092 announcement</a> for more details and workarounds.
+ </p>
+ <p>
+ LibPNG has been updated to 1.2.56. Previous versions had an out-of-bounds
+ read (<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8540"
+ >CVE-2015-8540</a>) which a hostile third party could trigger if they were
+ in a position to supply images for PageSpeed to optimize.
+ </p>
+ <p>
+ The latest version of Chrome for iOS (M48) switched to
+ the <a href="http://blog.chromium.org/2016/01/a-faster-more-stable-chrome-on-ios.html"
+ >WKWebView</a> for rendering, dropping support for WebP images. Prior
+ versions of PageSpeed will send WebP to Chrome on iOS, giving broken images
+ to these users. While this isn't a security vulnerability, this is a
+ serious enough breakage that we're including it in this security release.
+ </p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="announce-sec-update-201601"
+ >announce-sec-update-201601</a></strong>
+ HTTPS fetching vulnerability. (
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/4af5e65"
+ ><code><small>4af5e65</small></code></a>)</li>
+ <li><strong>
+ <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8540">
+ CVE-2015-8540</a></strong>
+ LibPNG out-of-bounds read in <code>png_check_keyword()</code>.
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/79aaa94"
+ ><code><small>79aaa94</small></code></a>)</li>
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1139">
+ Issue 1139</a></strong>
+ Link SSL library correctly.
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/5b8253"
+ ><code><small>5b8253</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1256">
+ Issue 1256</a></strong>
+ Don't send WebP to Chrome on iOS
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/23947d"
+ ><code><small>23947d</small></code></a>)</li>
+ </ul>
+
+ <h4 class="hide-from-toc">Issues Affecting Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1248">
+ Issue 1248</a></strong>
+ Crash on very long urls
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/befa494"
+ ><code><small>befa494</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.10.33.2-beta">Release 1.10.33.2-beta</h2>
+ <p>This bug-fix release was made December 21st, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1083">
+ Issue 1083</a></strong>
+ Newline in Content-Type meta tag breaks the page
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/08cbf9"
+ ><code><small>08cbf9</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1215">
+ Issue 1215</a></strong>
+ Missing CSS files with OptimizeForBandwith + combine_css
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/55e0962"
+ ><code><small>55e0962</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1222">
+ Issue 1222</a></strong>
+ rel=canonical links added for resources optimized with
+ InPlaceResourceOptimization
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/61f4e96"
+ ><code><small>61f4e96</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1226">
+ Issue 1226</a></strong>
+ Nested rewrites get inconsistent request properties
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/024eb91"
+ ><code><small>024eb91</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1227">
+ Issue 1227</a></strong>
+ Can't build PSOL
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/4b6a08"
+ ><code><small>4b6a08</small></code></a>)</li>
+ </ul>
+ <h4 class="hide-from-toc">Issues Affecting Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1224">
+ Issue 1224</a></strong>
+ Serf depends on APR 1.3
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/f3edc3b"
+ ><code><small>f3edc3b</small></code></a>)</li>
+ </ul>
+ <h4 class="hide-from-toc">Issues Affecting Nginx</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/808">
+ Issue 808</a></strong>
+ Noisy thread info printed on startup.
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/37e1c3"
+ ><code><small>37e1c3</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/b6a955"
+ ><code><small>b6a955</small></code></a>)
+ </li>
+ </ul>
+
+ <h2 id="release_1.10.33.1-beta">Release 1.10.33.1-beta</h2>
+ <p>This bug-fix release was made December 16th, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1218">
+ Issue 1218</a></strong>
+ WebP served to UAs that don't support it
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/e398794668f487f55db5c74baba286c708f7e0ee"
+ ><code><small>e39879</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1219">
+ Issue 1219</a></strong>
+ Crash in gzip header handling
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0f772622b8f315884f5f9dc79b3e0b58d8ee31cf"
+ ><code><small>0f7726</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.10.33.0-beta">Release 1.10.33.0-beta</h2>
+ <p>This release was made December 14th, 2015.</p>
+
+ <p>
+ With the 1.10 release we have several high-impact features to share. We're
+ most excited about <a href="filter-image-responsive/">Responsive Image
+ Support</a>, which delivers high resolution images to high pixel-density
+ screens by automatically generating html5 <code>srcset</code>
+ attributes for images. Other big changes
+ include <a href="system#gzip_cache">Caching Gzip Output</a>, which lets us
+ run gzip at the most aggressive encoding
+ level, <a href="config_filters#remote-configuration">Remote Config</a>,
+ which lets you load additional configuration over the network, and
+ converting <a href="reference-image-optimize#convert_to_webp_animated/"
+ >Animated GIF to WebP</a>, which reduces the size of animated GIFs by 65%.
+ </p>
+
+ <h3 class="hide-from-toc">New Automatically Enabled Features</h3>
+ <dl>
+ <dt><a href="system#gzip_cache">Cache Gzip Output</a></dt>
+ <dd>Compress rewritten resources at the highest compression setting and
+ store them compressed in cache.</dd>
+
+ <dt><a href="filter-insert-ga">Insert Universal Analytics</code></a></dt>
+ <dd>If enabled, the Insert Google Analytics filter will now insert Universal
+ Analytics (<code>analytics.js</code>) instead of the legacy
+ <code>ga.js</code>. This should have no impact on reporting, and gives
+ you access to the
+ <a href="https://support.google.com/analytics/answer/2790010?hl=en"
+ >benefits of Universal Analytics</a>.</dd>
+
+ <dt><a href="https_support#https_fetch">
+ Fetch resources over HTTPS</a></dt>
+ <dd>HTTPS fetching is now enabled in the default configuration.</dd>
+
+ <dt><a href="filter-js-minify#new-minifier">
+ Switch to new JS Minifier</a></dt>
+ <dd>The JavaScript minifier introduced in 1.8 is now the default.</dd>
+
+ <dt><a href="experiment#noop">
+ Add PageSpeedNoop Query Parameter</a></dt>
+ <dd>Add query parameter for cache busting.</dd>
+
+ <dt>HTML5-compliant attribute names</dt>
+ <dd>HTML5 requires all custom attributes to be prefixed
+ with <code>data-</code>, and with this release PageSpeed
+ generates <code>data-pagespeed-foo</code>
+ attributes. Old-style <code>pagespeed_foo</code> attributes are still
+ accepted.</dd>
+ </dl>
+
+ <h3 class="hide-from-toc">New Opt-In Features</h3>
+ <dl>
+ <dt><a href="config_filters#remote-configuration">
+ Remote Configuration</a></dt>
+ <dd>Fetch additional configuration directives over HTTPS.</dd>
+
+ <dt><a href="filter-image-responsive">
+ Responsive Image Support</a></dt>
+ <dd>Make images responsive by adding <code>srcset</code> attributes for
+ different pixel densities.</dd>
+
+ <dt><a href="reference-image-optimize#convert_to_webp_animated">
+ Animated WebP</a></dt>
+ <dd>Convert animated GIF to animated WebP for browsers that can
+ render it.</dd>
+
+ <dt><a href="filter-make-show-ads-async">
+ Make <code>showads.js</code> Asynchronous</a></dt>
+ <dd>Convert the blocking <code>showads.js</code> snippet into the
+ asynchronous <code>adsbygoogle.js</code> snippet.</dd>
+
+ <dt><a href="https_support#h2_configuration_nginx">
+ HTTP/2-specific configuration in ngx_pagespeed</a></dt>
+ <dd>Allow configuring filters and sharding differently depending on whether
+ the browser connection is HTTP/2.</dd>
+
+ <dt><a href="downstream-caching#script-variables">
+ Request-specific downstream caching configuration</a></dt>
+ <dd>Allow script variables in the downstream caching configuration. (Nginx
+ only)</dd>
+
+ <dt><a href="module-run-experiment#content-experiments">Content
+ Experiments</a></dt>
+ <dd>Allow PageSpeed experiments to log data to a Google Analytics Content
+ Experiment.</a></dt>
+ <dd></dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/931">
+ Issue 931</a></strong>
+ Do not serve source map on hash mismatch.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/979">
+ Issue 979</a></strong>
+ Allow spaces between filter names in <code>PageSpeedFilters</code>
+ header.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1085">
+ Issue 1085</a></strong>
+ Don't update <code>Last-Modified</code> when cache-extending.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1092">
+ Issue 1092</a></strong>
+ Parsing complex CSS can fail, leaving cache in an inconsistent state.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1109">
+ Issue 1109</a></strong>
+ Can't set <code>MessageBufferSize</code> to 0.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1116">
+ Issue 1116</a></strong>
+ Support gcc 4.6.3 when building from source.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1131">
+ Issue 1131</a></strong>
+ When building from source, respect the CXX variable.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1149">
+ Issue 1149</a></strong>
+ WebP transcoding doesn't work with MapProxyDomain+IPRO.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/pull/1150">
+ Issue 1150</a></strong>
+ BoringSSL won't compile under gcc5.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1154">
+ Issue 1154</a></strong>
+ Spin in serf.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1160">
+ Issue 1160</a></strong>
+ Don't serve WebP to Firefox on Android
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1164">
+ Issue 1164</a></strong>
+ Do not abbreviate 0s in CSS files as 0.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1173">
+ Issue 1173</a></strong>
+ <code>Disallow</code> should apply to defer_javascript.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1182">
+ Issue 1182</a></strong>
+ Don't try to resize images with invalid desired dimensions.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1183">
+ Issue 1183</a></strong>
+ Race condition in the shared memory cache between delete and write.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1184">
+ Issue 1184</a></strong>
+ Include canonical links for images and pdfs we rewrite.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1185">
+ Issue 1185</a></strong>
+ Improve CSS parser's handling of new constructs.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1186">
+ Issue 1186</a></strong>
+ Remove <code>/wp-admin</code> from our url blacklist.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1187">
+ Issue 1187</a></strong>
+ Prioritize Critical CSS writes a mixture of optimized and unoptimized
+ content.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1188">
+ Issue 1188</a></strong>
+ Location headers not rewritten when proxying redirects.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1189">
+ Issue 1189</a></strong>
+ Race in FileCache.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1193">
+ Issue 1193</a></strong>
+ File reading tracks line numbers.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1202">
+ Issue 1202</a></strong>
+ Improve resource usage for on-the-fly optimizations.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1203">
+ Issue 1203</a></strong>
+ File cache entries are read in 10k chunks.
+ </li>
+ </ul>
+
+ <h4 class="hide-from-toc">Apache-specific Issues</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1077">
+ Issue 1077</a></strong>
+ Purging fails if the top-level configuration has PageSpeed as off.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1088">
+ Issue 1088</a></strong>
+ Allow server owners to <a href="admin#limiting-handlers">block access to
+ handlers</a> such that they can't be re-enabled
+ in <code>.htaccess</code>.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1179">
+ Issue 1179</a></strong>
+ Compilation issue in ApacheFetch under 32-bit.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1191">
+ Issue 1191</a></strong>
+ IPRO recorder crashes on corrupt brigades with multiple EOS buckets.
+ </li>
+ </ul>
+
+ <h4 class="hide-from-toc">Nginx-specific Issues</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/957">
+ Issue 957</a></strong>
+ Fix handling of header-only requests.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1015">
+ Issue 1015</a></strong>
+ <code>MapProxyDomain</code> does not work with
+ <code>InPlaceResourceOptimization</code>.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/1021">
+ Issue 1021</a></strong>
+ Fix interaction with ngx_brotli.
+ </li>
+ </ul>
+
+ <h2 id="release_1.9.32.11-stable">Release 1.9.32.11-stable</h2>
+ <p>
+ This release was made December 9, 2015. It is a clone of the
+ 1.9.32.11-beta release.
+ </p>
+
+ <h2 id="release_1.9.32.11-beta">Release 1.9.32.11-beta</h2>
+ <p>This security update release was made December 9, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://www.openssl.org/news/secadv/20151203.txt">
+ https://www.openssl.org/news/secadv/20151203.txt</a></strong>
+ Update BoringSSL to pull in OpenSSL changes.
+ </li>
+ </ul>
+
+ <h2 id="release_1.9.32.10-stable">Release 1.9.32.10-stable</h2>
+ <p>This bug-fix release was made October 27th, 2015. It is a clone of the
+ 1.9.32.10-beta release.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/972">
+ Issue 972</a></strong>
+ <code>LoadFromFile</code> logs errors on 404s
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/3d44cc7bdaf3e4250a9d0c1f201d76c4de1de857"
+ ><code><small>3d44cc</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/992">
+ Issue 992</a></strong>
+ Segfault in https fetching
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/b4f4ae9b264c6973ff2835920ab32ade1981dd42"
+ ><code><small>b4f4ae9</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1039">
+ Issue 1039</a></strong>
+ Noisy <code>leaked_rewrite_drivers</code> on destruction message
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/58aaa4235de5829232f327436a706fdeb494e5dd"
+ ><code><small>58aaa4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1040">
+ Issue 1040</a></strong>
+ <code>inline_google_font_css</code> no longer works in Chrome
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/01045a9d333e4b6e0ef2c3a04826a3d15f9c277b"
+ ><code><small>01045a</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1043">
+ Issue 1043</a></strong>
+ Source maps set <code>?PageSpeed=off</code> for <code>.pagespeed.</code>
+ sources
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/9d6d08782d4289b6d71fee3bf5406cf65e3e0c0b"
+ ><code><small>9d6d08</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1050">
+ Issue 1050</a></strong>
+ <code>X-Sendfile</code> messages should not be cached
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/a49af6bdabe5bfea5e6bc496102590b8c7728ed4"
+ ><code><small>a49af6</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1060">
+ Issue 1060</a></strong>
+ Spurious <code>DownstreamCacheRebeaconingKey</code> Warning
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0f2a6fccb8f1a6cc32086df7cfd348d0ef69a9d9"
+ ><code><small>0f2a6f</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1068">
+ Issue 1068</a></strong>
+ Empty resources should not be cached.
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/741a86580dd6bf5b2a2f4bb24fca6d3bae919152"
+ ><code><small>741a86</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/3ac0192ab8e383ddcd8f77ead391482a75accb48"
+ ><code><small>3ac019</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1070">
+ Issue 1070</a></strong>
+ Opera Mini should not be sent <code>lazyload_images</code> JS
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0a90bb158d7e93e4076b93e12e973393c1930fdc"
+ ><code><small>0a90bb</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1078">
+ Issue 1078</a></strong>
+ Image rewriting dcheck-fails on images with invalid dimensions
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/166151ff0ab4bddd42c9a6ce4211c1c5832e780f"
+ ><code><small>166151</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1087">
+ Issue 1087</a></strong>
+ Critical images js doesn't play well with <code>display</code>
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/f01252e8ebea981610f3bbe969eec2b9a11235ed"
+ ><code><small>f01252</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1106">
+ Issue 1106</a></strong>
+ <code>If-Modified-Since</code> not working with IPRO
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/9ba2502d1750005b4d7dc4bb13379b6e4aa87edc"
+ ><code><small>9ba250</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1109">
+ Issue 1109</a></strong>
+ Can't set <code>MessageBufferSize</code> to 0
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/16e9f43edf38c74057b3cd45ed96c4040c59d688"
+ ><code><small>16e9f4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1116">
+ Issue 1116</a></strong>
+ Won't compile with <code>gcc</code> 4.6.3
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/3f917696279fe103d313b3afc1bfe13543c5510f"
+ ><code><small>3f9176</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1152">
+ Issue 1152</a></strong>
+ boringssl build fails on suse tumbleweed/archlinux
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/4cbc9320342dc1314db31eb9514da39058c6c6c7"
+ ><code><small>4cbc93</small></code></a>)</li>
+ </ul>
+
+ <h4 class="hide-from-toc">Apache-specific Issues</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1048">
+ Issue 1048</a></strong>
+ Apache stuck indefinitely waiting for PSOL
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/84a9deaf9c4df13ae707f44d06f577321de46e8c"
+ ><code><small>84a9de</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1081">
+ Issue 1081</a></strong>
+ Invalid cache entries on aborted requests
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/7a3fab0d5d517f2dd8808f906f75c50ec2c58f87"
+ ><code><small>7a3fab</small></code></a>)</li>
+ </ul>
+
+ <h4 class="hide-from-toc">Nginx-specific Issues</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/864">
+ Issue 864</a></strong>
+ <code>Server</code> header dropped
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/a9c292d8dc056aad8cf4c9fd57cf2dd8277ac627"
+ ><code><small>a9c292</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/888">
+ Issue 888</a></strong>
+ Check-fails on invalid urls instead of declining them.
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/9da85bb9d5a4a11ca082628edb4f0c6635497364"
+ ><code><small>9da85b</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/913">
+ Issue 913</a></strong>
+ Incorrect <code>Date</code> header on 32-bit
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/7355f2e2079aa04546e74aa78c9c6faa20c72c92"
+ ><code><small>7355f2</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/948">
+ Issue 948</a></strong>
+ Fails to build with nginx 1.7.11 and <code>--with-threads</code>
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/a81cc997a96844c9ab77c4c2bb805df455033e28"
+ ><code><small>a81cc9</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/956">
+ Issue 956</a></strong>
+ DCheck failure if pagespeed is off and no file cache path is
+ configured
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/c925b48400af18abaf73fb86dd723642efb29112"
+ ><code><small>c925b4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/965">
+ Issue 965</a></strong>
+ PageSpeed returning partial web pages
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/b9ca5d865d02ff8e889d1cf710006a23081d3705"
+ ><code><small>b9ca5d</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.9.32.10-beta">Release 1.9.32.10-beta</h2>
+ <p>This bug-fix release was made October 8th, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1048">
+ Issue 1048</a></strong>
+ Apache stuck indefinitely waiting for PSOL
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/84a9deaf9c4df13ae707f44d06f577321de46e8c"
+ ><code><small>84a9de</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1152">
+ Issue 1152</a></strong>
+ boringssl build fails on suse tumbleweed/archlinux
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/4cbc9320342dc1314db31eb9514da39058c6c6c7"
+ ><code><small>4cbc93</small></code></a>)</li>
+ </ul>
+
+ <h2 id="release_1.9.32.6-beta">Release 1.9.32.6-beta</h2>
+ <p>This bug-fix release was made July 29, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <h4 class="hide-from-toc">Issues Affecting both Nginx and Apache</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/972">
+ Issue 972</a></strong>
+ <code>LoadFromFile</code> logs errors on 404s
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/3d44cc7bdaf3e4250a9d0c1f201d76c4de1de857"
+ ><code><small>3d44cc</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/992">
+ Issue 992</a></strong>
+ Segfault in https fetching
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/b4f4ae9b264c6973ff2835920ab32ade1981dd42"
+ ><code><small>b4f4ae9</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1039">
+ Issue 1039</a></strong>
+ Noisy <code>leaked_rewrite_drivers</code> on destruction message
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/58aaa4235de5829232f327436a706fdeb494e5dd"
+ ><code><small>58aaa4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1040">
+ Issue 1040</a></strong>
+ <code>inline_google_font_css</code> no longer works in Chrome
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/01045a9d333e4b6e0ef2c3a04826a3d15f9c277b"
+ ><code><small>01045a</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1043">
+ Issue 1043</a></strong>
+ Source maps set <code>?PageSpeed=off</code> for <code>.pagespeed.</code>
+ sources
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/9d6d08782d4289b6d71fee3bf5406cf65e3e0c0b"
+ ><code><small>9d6d08</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1050">
+ Issue 1050</a></strong>
+ <code>X-Sendfile</code> messages should not be cached
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/a49af6bdabe5bfea5e6bc496102590b8c7728ed4"
+ ><code><small>a49af6</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1060">
+ Issue 1060</a></strong>
+ Spurious <code>DownstreamCacheRebeaconingKey</code> Warning
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0f2a6fccb8f1a6cc32086df7cfd348d0ef69a9d9"
+ ><code><small>0f2a6f</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1068">
+ Issue 1068</a></strong>
+ Empty resources should not be cached.
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/741a86580dd6bf5b2a2f4bb24fca6d3bae919152"
+ ><code><small>741a86</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/3ac0192ab8e383ddcd8f77ead391482a75accb48"
+ ><code><small>3ac019</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1070">
+ Issue 1070</a></strong>
+ Opera Mini should not be sent <code>lazyload_images</code> JS
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/0a90bb158d7e93e4076b93e12e973393c1930fdc"
+ ><code><small>0a90bb</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1078">
+ Issue 1078</a></strong>
+ Image rewriting dcheck-fails on images with invalid dimensions
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/166151ff0ab4bddd42c9a6ce4211c1c5832e780f"
+ ><code><small>166151</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1087">
+ Issue 1087</a></strong>
+ Critical images js doesn't play well with <code>display</code>
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/f01252e8ebea981610f3bbe969eec2b9a11235ed"
+ ><code><small>f01252</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1106">
+ Issue 1106</a></strong>
+ <code>If-Modified-Since</code> not working with IPRO
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/9ba2502d1750005b4d7dc4bb13379b6e4aa87edc"
+ ><code><small>9ba250</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1109">
+ Issue 1109</a></strong>
+ Can't set <code>MessageBufferSize</code> to 0
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/16e9f43edf38c74057b3cd45ed96c4040c59d688"
+ ><code><small>16e9f4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1116">
+ Issue 1116</a></strong>
+ Won't compile with <code>gcc</code> 4.6.3
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/3f917696279fe103d313b3afc1bfe13543c5510f"
+ ><code><small>3f9176</small></code></a>)</li>
+ </ul>
+
+ <h4 class="hide-from-toc">Apache-specific Issues</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1048">
+ Issue 1048</a></strong>
+ Apache stuck indefinitely waiting for PSOL
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/e59644fc50c257f1360194a895286886c87481b8"
+ ><code><small>e59644</small></code></a>,
+ <a href="https://github.com/apache/incubator-pagespeed-mod/commit/c001a83e015bec5a5a1316e4399349abd02ea7e6"
+ ><code><small>c001a8</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1081">
+ Issue 1081</a></strong>
+ Invalid cache entries on aborted requests
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/7a3fab0d5d517f2dd8808f906f75c50ec2c58f87"
+ ><code><small>7a3fab</small></code></a>)</li>
+ </ul>
+
+ <h4 class="hide-from-toc">Nginx-specific Issues</h4>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/864">
+ Issue 864</a></strong>
+ <code>Server</code> header dropped
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/a9c292d8dc056aad8cf4c9fd57cf2dd8277ac627"
+ ><code><small>a9c292</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/888">
+ Issue 888</a></strong>
+ Check-fails on invalid urls instead of declining them.
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/9da85bb9d5a4a11ca082628edb4f0c6635497364"
+ ><code><small>9da85b</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/913">
+ Issue 913</a></strong>
+ Incorrect <code>Date</code> header on 32-bit
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/7355f2e2079aa04546e74aa78c9c6faa20c72c92"
+ ><code><small>7355f2</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/948">
+ Issue 948</a></strong>
+ Fails to build with nginx 1.7.11 and <code>--with-threads</code>
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/a81cc997a96844c9ab77c4c2bb805df455033e28"
+ ><code><small>a81cc9</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/956">
+ Issue 956</a></strong>
+ DCheck failure if pagespeed is off and no file cache path is
+ configured
+ (<a href="https://github.com/apache/incubator-pagespeed-mod/commit/c925b48400af18abaf73fb86dd723642efb29112"
+ ><code><small>c925b4</small></code></a>)</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/965">
+ Issue 965</a></strong>
+ PageSpeed returning partial web pages
+ (<a href="https://github.com/apache/incubator-pagespeed-ngx/commit/b9ca5d865d02ff8e889d1cf710006a23081d3705"
+ ><code><small>b9ca5d</small></code></a>)</li>
+ </ul>
+
+
+ <h2 id="release_1.9.32.4-stable">Release 1.9.32.4-stable</h2>
+ <p>
+ This release was made Jun 17, 2015. It is a clone of the
+ 1.9.32.4-beta release.
+ </p>
+
+ <h2 id="release_1.9.32.4-beta">Release 1.9.32.4-beta</h2>
+ <p>This security update release was made June 17, 2015.</p>
+
+ <p>
+ In versions between 1.7 and 1.9.32.3, PageSpeed was built with a version of
+ OpenSSL that was vulnerable to the issues detailed in
+ the <a href="http://openssl.org/news/secadv_20150611.txt">June 11, 2015
+ security advisory</a>. We have updated our crypto library to fix these
+ issues. PageSpeed now builds with Google's BoringSSL, an OpenSSL fork which
+ includes this fix, and is expected to be more stable in future.
+ </p>
+ <p>
+ In versions between 1.8.31.2 and 1.9.32.3 it was possible to cause a crash
+ by requesting JavaScript source maps when source mapping had been turned
+ off.
+ </p>
+ <p>
+ We recommend that all users upgrade. If this is not possible, however, the
+ following workarounds are available:
+ <ul>
+ <li>The OpenSSL vulnerability only applies if you have
+ <a href="https_support"><code>FetchHttps</code></a> enabled and have
+ configured PageSpeed to fetch HTTPS content over the open internet.
+ Disabling <code>FetchHttps</code> will prevent these crashes, but will
+ also disable PageSpeed's optimizations for any content that must be
+ fetched over HTTPS.</li>
+ <li>Set a <code>Request Option Override</code> token, and explicitly
+ enable <a href="/filter-source-maps-include"
+ ><code>include_js_source_maps</code></a>. This
+ makes it impossible for attackers to disable source maps and cause
+ these crashes.</li>
+ </ul>
+ </p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1094">
+ Issue 1094</a></strong>
+ Source map can be requested with option disabled.
+ </li>
+ <li><strong>
+ <a href="http://openssl.org/news/secadv_20150611.txt">
+ OpenSSL Security Advisory [11 Jun 2015]</a></strong>
+ Replace OpenSSL with BoringSSL.
+ </li>
+ </ul>
+
+ <h2 id="release_1.9.32.3-stable">Release 1.9.32.3-stable</h2>
+ <p>
+ This release was made January 14, 2015. It is a clone of the
+ 1.9.32.3-beta release.
+ </p>
+
+ <h2 id="release_1.9.32.3-beta">Release 1.9.32.3-beta</h2>
+ <p>This bug-fix release was made January 5th, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/1025">
+ Issue 1025</a></strong>
+ Purge cache UI has problems in admin console.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/1028">
+ Issue 1028</a></strong>
+ Malformed CSS file can cause a hang in CSS parser.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/832">
+ ngx_pagespeed Issue 832</a></strong>
+ Don't log to stderr/stdout: gzip enabling code.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/839">
+ ngx_pagespeed Issue 839</a></strong>
+ ngx_pagespeed 1.9.32.2 doesn't compile with Tengine.</li>
+ </ul>
+
+ <h2 id="release_1.8.31.6-stable">Release 1.8.31.6-stable</h2>
+ <p>This bug-fix release was made January 5th, 2015.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/1028">
+ Issue 1028</a></strong>
+ Malformed CSS file can cause a hang in CSS parser.</li>
+ </ul>
+
+ <h2 id="release_1.9.32.2-beta">Release 1.9.32.2-beta</h2>
+ <p>This security update release was made October 27, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/978">
+ Issue 978</a></strong>
+ Blacklist Windows Browser for transcoding to webp.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/982">
+ Issue 982</a></strong>
+ Defer javascript not working in IE9 or IE11.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/989">
+ Issue 989</a></strong>
+ IPRO with LoadFromFile on a resource that is already fully optimized
+ serves <code>cc:max-age=300</code>.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/992">
+ Issue 992</a></strong>
+ Malformed CSS can lead to unbounded stack depth.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1004">
+ Issue 1004</a></strong>
+ Disable SSLv3 and SSLv2 support in serf fetcher.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1012">
+ Issue 1012</a></strong>
+ JS error in rendered_image_dimensions filter when the same image appears
+ multiple times on a page.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/808">
+ ngx_pagespeed Issue 808</a></strong>
+ ngx_pagespeed prints <code>Log: [info] No threading detected. Own threads:
+ 1 Rewrite, 1 Expensive Rewrite.</code> on startup.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/813">
+ ngx_pagespeed Issue 813</a></strong>
+ Segmentation fault when ngx_pagespeed is built with gcc 4.1.2
+ </li>
+ </ul>
+
+ <h2 id="release_1.8.31.5-stable">Release 1.8.31.5-stable</h2>
+ <p>This security update release was made October 20, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/992">
+ Issue 992</a></strong>
+ Malformed CSS can lead to unbounded stack depth.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/1004">
+ Issue 1004</a></strong>
+ Disable SSLv3 and SSLv2 support in serf fetcher.
+ </li>
+ </ul>
+
+ <h2 id="release_1.9.32.1-beta">Release 1.9.32.1-beta</h2>
+ <p>This release was made September 16, 2014.</p>
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="domains#LoadFromFileScriptVariables">
+ Support nginx script variables in <code>LoadFromFile</code></a></dt>
+ <dd>Allows configuration like <code>LoadFromFile "http://$host/"
+ "$document_root"</code></dd>
+
+ <dt><a href="system#native-fetcher-keep-alive">
+ Support HTTP Persistent Connections</a></dt>
+ <dd>When using the native fetcher for Nginx, advertise <code>Connection:
+ Keep-Alive</code> and keep active connections around for reuse.</a></dt>
+
+ <dt><a href="config_filters#debug">
+ Improved <code>debug</code> filter support</a></dt>
+
+ <dd>Many more filters now support debug logging, emitting explanatory
+ comments inline when the <code>debug</code> filter is enabled.</dd>
+
+ <dt><a href="system#ipro">
+ Enabled <code>InPlaceResourceOptimization</code> by default</a></dt>
+ <dd>In Place Resource Optimization is now enabled by default.</dd>
+
+ <dt><a href="system#purge_cache">
+ Purge individual URLs from cache</a></dt>
+ <dd>Allows cache entries to be purged by PageSpeed administrators.</dd>
+
+ <dt><a href="admin#config">
+ Improved PageSpeed admin site</a></dt>
+ <dd>Admin page improved to show more information, provide graphs, and
+ perform cache-purging operations.</dd>
+ <dt><a href="experiment#StickyQueryParams">"Sticky" Query
+ Parameters</a></dt>
+ <dd>Set query parameters in cookies for persisting options across queries.
+ </dd>
+
+ <dt><a href="restricting_urls#url_signatures">
+ Signing resource URLs</a></dt>
+ <dd>Optionally cryptographically sign and verify resource URLs.</dd>
+
+ <dt><a href="experiment#restrict-request-options">Restrict query
+ params</a></dt>
+ <dd>Optionally restrict interpretation of query parameters.</dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/786">
+ Issue 786</a></strong>
+ serf_url_async_fetcher.cc error messages using IP instead of domain name.
+ </li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/794">
+ Issue 794</a></strong>
+ Colorize warnings and errors in message_history page.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/813">
+ Issue 813</a></strong>
+ Disable beaconing for bots.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/850">
+ Issue 850</a></strong>
+ dedup_inlined_images breaks site combined with lazyload_images and
+ defer_javascript.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/853">
+ Issue 853</a></strong>
+ Provide separate filters rewrite_javascript_external and
+ rewrite_javascript_inline.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/909">
+ Issue 909</a></strong>
+ Strict mode detection is too conservative.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/965">
+ Issue 965</a></strong>
+ Don't relocate scoped style tags.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/967">
+ Issue 967</a></strong>
+ Don't relocate scoped style tags in prioritize_critical_css.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/969">
+ Issue 969</a></strong>
+ Don't send inline WebP to Chrome/36 on iOS. See issue for workaround fix
+ for both nginx and Apache.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/984">
+ Issue 984</a></strong>
+ Fix handling of experiment spec, so that options are applied when using
+ the default filters.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/984">
+ Issue 985</a></strong>
+ Re-add query params when we get a redirection response.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/985">
+ Issue 986</a></strong>
+ Default flattening limit is too low.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/238">
+ ngx_pagespeed Issue 238</a></strong>
+ Automatically enable gzip compression in Nginx.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/712">
+ ngx_pagespeed Issue 712</a></strong>
+ <code>.pagespeed</code> resources served with chunked encoding on
+ Nginx.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/719">
+ ngx_pagespeed Issue 719</a></strong>
+ IPRO with LoadFromFile gives null responses for unknown file
+ extensions.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/725">
+ ngx_pagespeed Issue 725</a></strong>
+ Duplicate <code>Location</code> headers when proxying with Nginx.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/pull/731">
+ ngx_pagespeed Issue 731</a></strong>
+ Support setting <tt>NumRewriteThreads</tt>
+ and <tt>NumExpensiveRewriteThreads</tt> in Nginx.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/739">
+ ngx_pagespeed Issue 739</a></strong>
+ Nginx compilation error with GCC 4.9.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/757">
+ ngx_pagespeed Issue 757</a></strong>
+ Support POST responses for HTML.</li>
+ </ul>
+
+ <h2 id="release_1.8.31.4-stable">Release 1.8.31.4-stable</h2>
+ <p>
+ This release was made August 5, 2014. It is a clone of the
+ 1.8.31.4-beta release.
+ </p>
+
+ <h2 id="release_1.8.31.4-beta">Release 1.8.31.4-beta</h2>
+ <p>This security update release was made June 17th, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li>Update OpenSSL version to include fixes for a
+ <a href="openssl-1.0.1h-fixes.html">man-in-the-middle attack</a>.</li>
+ </ul>
+
+ <h2 id="release_1.7.30.5-stable">Release 1.7.30.5-stable</h2>
+ <p>This security update release was made June 17th, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li>Update OpenSSL version to include fixes for a
+ <a href="openssl-1.0.1h-fixes.html">man-in-the-middle attack</a>.</li>
+ </ul>
+
+ <h2 id="release_1.8.31.3-beta">Release 1.8.31.3-beta</h2>
+ <p>This bug-fix release was made May 30th, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/941">
+ Issue 941</a></strong>
+ Pagespeed optimized resource sending incorrect Content-Length header.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/945">
+ Issue 945</a></strong>
+ mod_pagespeed cache directory is unwritable by default.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/947">
+ Issue 947</a></strong>
+ Do not serve source JavaScript when a rewritten source map is requested.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/pull/701">
+ ngx_pagespeed Pull 701</a></strong>
+ Allow admin paths to be set at server scope.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/705">
+ ngx_pagespeed Issue 705</a></strong>
+ StaticAssetPrefix not working.</li>
+ </ul>
+
+ <h2 id="release_1.8.31.2-beta">Release 1.8.31.2-beta</h2>
+ <p>This release was made on May 6th, 2014.</p>
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="optimize-for-bandwidth">
+ New rewrite level <code>OptimizeForBandwidth</code></a></dt>
+ <dd>Safe rewrite level in which HTML is not altered, but CSS, JS, and
+ images are rewritten in place to conserve bandwidth.</dd>
+
+ <dt><a href="admin">
+ New admin pages</a></dt>
+ <dd>Admin consoles at <code>pagespeed_admin</code>
+ and <code>pagespeed_global_admin</code> simplify system configuration.</dd>
+
+ <dt><a href="filter-source-maps-include">
+ JavaScript source map support</a></dt>
+ <dd>New filter <code>include_js_source_maps</code> allows debugging of
+ PageSpeed-minified code.</dd>
+
+ <dt><a href="reference-image-optimize#convert_png_to_jpeg">
+ Image classification</a></dt>
+ <dd>PageSpeed now uses a classification algorithm to decide when to convert
+ a lossless image (png or gif) to a lossy format (jpeg or lossy WebP).</dd>
+
+ <dt><a href="reference-image-optimize#convert_jpeg_to_webp">
+ WebP conversion on by default</a></dt>
+ <dd>The <code>convert_jpeg_to_webp</code> filter is now on by default as a
+ core rewriter and as part of <code>rewrite_images</code>.</dd>
+
+ <dt><a href="reference-image-optimize#serve_webp_urls">
+ Serve WebP URLs to any browser</a></dt>
+ <dd>Enable users with older browsers to view <code>.webp</code> URLs, making
+ it easier for visitors to share image links.</dd>
+
+ <dt><a href="domains#inline_without_auth">
+ Inline resources without explicit authorization</a></dt>
+ <dd>Permits inlining of CSS and JavaScript from domains that are not
+ directly authorized for rewriting (for example because they belong to a
+ third party).</dd>
+
+ <dt><a href="downstream-caching#beaconing">
+ Downstream cache rebeaconing support</a></dt>
+ <dd>Allows filters that depend on beaconing (such as lazy loading and
+ inlining of images) to interact correctly with downstream caches such as
+ Varnish.</dd>
+
+ <dt><a href="system#in_place_optimize_for_browser">
+ Browser-dependent in-place optimization</a></dt>
+ <dd>Enabling <code>in_place_optimize_for_browser</code> permits
+ browser-dependent CSS and image optimizations such as WebP conversion.</dd>
+
+ <dt><a href="configuration#pagespeed_static">
+ Configurable location for static assets</a></dt>
+ <dd>New option <code>StaticAssetPrefix</code> specifies the path to
+ PageSpeed-specific static assets.</dd>
+
+ <dt><a href="system#cache-fragment">
+ Cache sharing among domains</a></dt>
+ <dd>New option <code>CacheFragment</code> allows multiple domains to share a
+ portion of the cache, enabling them to share common resources.</dd>
+
+ <dt><a href="module-run-experiment">
+ Ability to set options in experiment specs</a></dt>
+ <dd>Experiment specifications can now include a comma-separated list of
+ option settings similar to those in query parameters.</dd>
+
+ <dt><a href="domains#mapping_origin">
+ Optional <code>Host:</code> header in <code>MapOriginDomain</code></a></dt>
+ <dd>The <code>MapOriginDomain</code> directive can now include
+ a <code>Host:</code> header to be used by PageSpeed when fetching
+ resources.</dd>
+
+ <dt><a href="https_support#https_fetch">
+ Fetch HTTPS resources in ngx_pagespeed</a></dt>
+ <dd>Support secure resource fetching using HTTPS in the nginx web server
+ (supported in mod_pagespeed since version 1.7).</dd>
+
+ <dt><a href="filter-lazyload-images#lazyload-after-onload">
+ <code>LazyloadImagesAfterOnload</code> on by default</a></dt>
+ <dd>After onload, load all images even if some are not yet visible.</dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/106">
+ Issue 106</a></strong>
+ Inline js files even if they contain <code></script></code>.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/452">
+ Issue 452</a></strong>
+ Can't run experiments except on filters and some thresholds.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/570">
+ Issue 570</a></strong>
+ Document <code>RewriteDeadlineMs</code>.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/586">
+ Issue 586</a></strong>
+ Track image rewriting time
+ in <code>mod_pagespeed_variables</code>.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/692">
+ Issue 692</a></strong>
+ Fixed-case paths broken in domain-mapping directives.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/752">
+ Issue 752</a></strong>
+ Issue downstream cache purges only for GET requests.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/812">
+ Issue 812</a></strong>
+ SerfThreadFn might compile with the wrong calling convention and crash
+ on shutdown.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/813">
+ Issue 813</a></strong>
+ Disable beaconing for bots.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/817">
+ Issue 817</a></strong>
+ WebP transcoding should trigger off <code>Accept:</code> headers and
+ issue <code>Vary: Accept.</code></li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/831">
+ Issue 831</a></strong>
+ Spriting replaces transparent color with arbitrary color.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/832">
+ Issue 832</a></strong>
+ DCHECK failure on <code>static_rewriter</code> test.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/840">
+ Issue 840</a></strong>
+ Deadlock when rewriting resources.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/845">
+ Issue 845</a></strong>
+ etag should not be issued for mismatching content.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/846">
+ Issue 846</a></strong>
+ PageSpeed's cache lookup needs to become <code>Vary: Accept</code>
+ aware, at least for WebP.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/855">
+ Issue 855</a></strong>
+ Deadlock when using apache threads with in-place rewriting, a threaded
+ mpm, and memcached.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/856">
+ Issue 856</a></strong>
+ Improve error message reporting when shared memory segment creation
+ fails.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/858">
+ Issue 858</a></strong>
+ Remove insignificant message: “Default shared memory cache:
+ Cache named pagespeed_default_shm already exists”.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/863">
+ Issue 863</a></strong>
+ Cache-Control: no-transform has no effect if combined with other
+ values.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/865">
+ Issue 865</a></strong>
+ ImplicitCacheTtlMs directive doesn't work in IPRO mode.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/871">
+ Issue 871</a></strong>
+ Apply in-place optimization on first request
+ if <code>InPlaceRewriteDeadlineMs</code> is -1
+ and <code>LoadFromFile</code> is enabled.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/881">
+ Issue 881</a></strong>
+ Changing JS files can make combining/minification produce reference
+ errors.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/882">
+ Issue 882</a></strong>
+ Run <code>combine_javascript</code>
+ before <code>rewrite_javascript</code>, and have it do the
+ minification inline.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/883">
+ Issue 883</a></strong>
+ Employ image classification to make better decisions about lossy
+ conversion.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/885">
+ Issue 885</a></strong>
+ Enabling memcached causes “Waiting for property cache”
+ messages and server spinning.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/907">
+ Issue 907</a></strong>
+ Sharedmem “Unable to insert object of size” message needs to be
+ demoted and indicate the cache key.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/915">
+ Issue 915</a></strong>
+ Link error on “html_minifier_main” using GCC 4.9.0 + [Gold]
+ Linker.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/918">
+ Issue 918</a></strong>
+ <style scoped> is translated to <link rel="stylesheet"
+ scoped> however there is no browser support for the latter.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/921">
+ Issue 921</a></strong>
+ Downstream Caches - PURGE request has a double slash.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/927">
+ Issue 927</a></strong>
+ defer_javascript errors in Safari 4.x and 5.0, user scripts fail.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/928">
+ Issue 928</a></strong>
+ Allow user defined attributes to override spec-defined ones.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/937">
+ Issue 937</a></strong>
+ Increase beacon frequency until there's enough data, then decrease it.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/938">
+ Issue 938</a></strong>
+ Check for image criticality at image onload to fix carousel display.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/537">
+ ngx_pagespeed Issue 537</a></strong>
+ Client times out on 304 requests.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/pull/560">
+ ngx_pagespeed Pull 560</a></strong>
+ Unbreak /ngx_pagespeed_messages.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/577">
+ ngx_pagespeed Issue 577</a></strong>
+ Wrong date HTTP header after HTML rewrite.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/pull/590">
+ ngx_pagespeed Pull 590</a></strong>
+ Add proxy support to native fetcher.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/pull/621">
+ ngx_pagespeed Pull 621</a></strong>
+ Don't call chown() unless necessary.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/625">
+ ngx_pagespeed Issue 625</a></strong>
+ CHECK failure on DNS timeout.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/652">
+ ngx_pagespeed Issue 652</a></strong>
+ DownstreamCachePurgeLocationPrefix removes cache headers for
+ <code>.pagespeed.</code> resources.</li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/686">
+ ngx_pagespeed Issue 686</a></strong>
+ DCHECK failed: !src.IsKeySaved().</li>
+ </ul>
+
+ <h2 id="release_1.7.30.4-stable">Release 1.7.30.4-stable</h2>
+ <p>
+ This release was made March 24, 2014. It is a clone of the
+ 1.7.30.4-beta release.
+ </p>
+
+ <h2 id="release_1.7.30.4-beta">Release 1.7.30.4-beta</h2>
+ <p>This bug-fix release was made March 13, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/441">
+ Issue 441</a></strong>
+ Filter "make_google_analytics_async" turns benign call to deprecated
+ method into a functional error.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/781">
+ Issue 781</a></strong>
+ Images are inlined into CSS styles in IE7 if Firefox renders them
+ first.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/874">
+ Issue 874</a></strong>
+ Warning messages in log for "ModPagespeed:noscript?".</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/880">
+ Issue 880</a></strong>
+ Combining minified JS files can produce invalid results when deadline
+ exceeded.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/885">
+ Issue 885</a></strong>
+ Enabling memcached causes "Waiting for property cache" messages and
+ server spinning.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/896">
+ Issue 896</a></strong>
+ IPRO on reverse proxy can capture gzipped content and serve it to users
+ without content-encoding:gzip.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/898">
+ Issue 898</a></strong>
+ IPRO does not correctly handle resources which failed to fetch.</li>
+ </ul>
+
+ <h2 id="release_1.7.30.3-beta">Release 1.7.30.3-beta</h2>
+ <p>This bug-fix release was made January 16, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/867">
+ Issue 867</a></strong>
+ Data URLs in CSS become blank after rewriting.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/596">
+ ngx_pagespeed Issue 596</a></strong>
+ Data URLs in CSS and JavaScript are broken after upgrading ngx_pagespeed
+ from 1.6 to 1.7.30.2.</li>
+ </ul>
+
+ <h2 id="release_1.7.30.2-beta">Release 1.7.30.2-beta</h2>
+ <p>This bug-fix release was made January 7, 2014.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/627">
+ Issue 627</a></strong>
+ Quoting of ModPagespeed:noscript insertion broken in some browsers.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/831">
+ Issue 831</a></strong>
+ Spriting replaces transparent color with arbitrary color.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/840">
+ Issue 840</a></strong>
+ Deadlock when rewriting resources.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/856">
+ Issue 856</a></strong>
+ Improve error message reporting when shared memory segment creation
+ fails.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/857">
+ Issue 857</a></strong>
+ Avoid insertions (e.g., beacon) at midpoint of the document which ought
+ to be at the end of it.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/858">
+ Issue 858</a></strong>
+ Remove insignificant message: Default shared memory cache: Cache named
+ pagespeed_default_shm already exists.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/860">
+ Issue 860</a></strong>
+ GoogleFontCssInlineFilter doesn't handle protocol-relative URLs
+ correctly.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/861">
+ Issue 861</a></strong>
+ PSOL sample application has dcheck-failure in the demo program.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/862">
+ Issue 862</a></strong>
+ mod_pagespeed may have deadlock in property cache fetch in IPRO non-proxy
+ mode if memcached is used.</li>
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/578">
+ ngx_pagespeed Issue 578</a></strong>
+ Nginx Resolver API changes break the ngx_pagespeed build.</li>
+ </ul>
+
+ <h2 id="release_1.6.29.7-stable">Release 1.6.29.7-stable</h2>
+ <p>
+ This release was made November 13th, 2013. It is a clone of the
+ 1.6.29.7-beta release.
+ </p>
+
+ <h2 id="release_1.7.30.1-beta">Release 1.7.30.1-beta</h2>
+ <p>This release was made on November 7th, 2013.</p>
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="system#default_shm_cache">
+ Default shared memory metadata cache</a></dt>
+ <dd>Create an on-by-default memory cache shared by all server processes.
+ </dd>
+
+ <dt><a href="https_support#https_fetch">
+ Fetch HTTPS resources for Apache server</a></dt>
+ <dd>Support secure resource fetching using HTTPS for Apache server.</dd>
+
+ <dt><a href="https_support#fetch_from_mod_spdy">
+ Fetch HTTPS resources using mod_spdy for Apache server</a></dt>
+ <dd>Support faster HTTPS resource fetching, if you also use mod_spdy version
+ 0.9.4.1 or higher.</dd>
+
+ <dt><a href="filter-css-inline-google-fonts">
+ Inline Google Fonts API CSS</a></dt>
+ <dd>Reduce the number of blocking round trips required to start rendering
+ a web page using the Google Fonts API.</dd>
+
+ <dt><a href="configuration#preserve-url-relativity">
+ Preserve URL relativity</a></dt>
+ <dd>Specify whether to preserve the relative URLs or convert them to
+ absolute URLs.</dd>
+
+ <dt><a href="domains#url-valued-attributes">
+ Optimize multiple URL-valued attributes</a></dt>
+ <dd>Support optimizing more than one URL-valued attribute per element.</dd>
+
+ <dt><a href="system#implicit_cache_ttl">
+ Implicit cache-lifetime for resources</a></dt>
+ <dd>Specify the cache lifetime for resources that do not have "Expires"
+ or "Cache-Control" headers.</dd>
+
+ <dt><a href="system#ipro_deadline">
+ Maximum time for inplace resource rewriting</a></dt>
+ <dd>Specify the maximum time to wait for a resource to be rewritten.
+ If the rewriting completes within this time, the rewritten resource
+ will be served, otherwise the original resource will be served and
+ rewriting will continue in the background.</dd>
+
+ <dt><a href="filter-css-combine#MaxCombinedCssBytes">
+ Maximum size of the combined CSS</a></dt>
+ <dd>Specify the maximum size that CSS files may be combined to.</dd>
+
+ <dt><a href="reference-image-optimize#ImageResolutionLimitBytes">
+ Maximum size of images that will be optimized</a></dt>
+ <dd>Specify the maximum size of decompressed images that PageSpeed will
+ try to optimize.</dd>
+
+ <dt><a href="reference-image-optimize#ProgressiveJpegMinBytes">
+ Minimum size of JPEG images that will be compressed in progressive
+ format</a></dt>
+ <dd>Specify the size threshold that determines when to use progressive
+ format for compressing images to JPEG. Progressive JPEG is more
+ effective for compressing large images, while non-progressive JPEG
+ works better for smaller ones.</dd>
+
+ <dt><a href="reference-image-optimize#resize_rendered_image_dimensions">
+ Resize images to rendered dimensions</a></dt>
+ <dd>Resize images to, or close to, the actual dimensions that they will
+ be displayed. The rendered dimension may be smaller than that specified
+ by the width and height attributes.</dd>
+
+ <dt><a href="filter-image-optimize">
+ Better image compression and resizing</a></dt>
+ <dd>Use more optimized image resizing technique and remove OpenCV. Replace
+ libjpeg with the more efficient libjpeg-turbo.</dd>
+
+ <dt>Configuration defaults updated</dt>
+ <dd>Starting in this release, we combine JavaScript and convert PNG images
+ to JPEG by default.
+ <ul>
+ <li>Default <a href="filter-js-combine">
+ combine_javascript</a> to on (was off).</li>
+ <li>Default <a href="reference-image-optimize#convert_png_to_jpeg">
+ convert_png_to_jpeg</a> to on (was off).</li>
+ </ul>
+ </dd>
+
+ <dt><a href="system#ipro">In-Place Resource Optimization</a> for Nginx</dt>
+ <dd>ngx_pagespeed can now optimize resources accessed directly from
+ their original URLs, not just those rewritten with the PageSpeed URL
+ format. This can be useful for optimizing resources referenced from other
+ sites and from JavaScript.</dd>
+ </dl>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/198">
+ Issue 198</a></strong>
+ Optimize handling of multiple references to the same image on a page
+ at different sizes.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/376">
+ Issue 376</a></strong>
+ Image resizing should utilize width/height information in CSS classes.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/423">
+ Issue 423</a></strong>
+ Support fetching resources over HTTPS.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/466">
+ Issue 466</a></strong>
+ Provide a way to optimize all resource attributes in a tag.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/503">
+ Issue 503</a></strong>
+ Preserve URL relativeness.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/664">
+ Issue 664</a></strong>
+ Strip Connection and other hop-by-hop headers when saving input
+ resource.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/755">
+ Issue 755</a></strong>
+ Memory leak with 'graceful' restart relating to shared memory
+ starting in 1.4.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/756">
+ Issue 756</a></strong>
+ ModifyCachingHeaders should not touch Cache-Control headers if
+ downstream-caching is enabled.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/757">
+ Issue 757</a></strong>
+ Make maximum image size configurable.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/758">
+ Issue 758</a></strong>
+ Add configurability for DisableRewriteOnNoTransform and system test.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/759">
+ Issue 759</a></strong>
+ Cleanup race in SchedulerBlockingFunction::Block() and ::Cancel().
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/773">
+ Issue 773</a></strong>
+ Repeat image inlined at low resolution when local_storage_cache is
+ enabled.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/799">
+ Issue 799</a></strong>
+ Console slow when logfile is large.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/803">
+ Issue 803</a></strong>
+ Metadata cache will reminder not-optimizable for 5 minutes after
+ rate-limiting drops a fetch.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/809">
+ Issue 809</a></strong>
+ mod_pagespeed disables mod_headers/mod_expires when proxying content
+ with cache-control set.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/42">
+ ngx_pagespeed Issue 42</a></strong>
+ Added in-place resource optimization.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/356">
+ ngx_pagespeed Issue 356</a></strong>
+ Support setting options in response headers.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/367">
+ ngx_pagespeed Issue 367</a></strong>
+ Fix intermittent crash on reload.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/433">
+ ngx_pagespeed Issue 433</a></strong>
+ Unable to compile with gcc 4.8.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/447">
+ ngx_pagespeed Issue 447</a></strong>
+ Log message to the correct vhost-specific log file.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/463">
+ ngx_pagespeed Issue 463</a></strong>
+ Native fetcher crashes when running out of file descriptors.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/522">
+ ngx_pagespeed Issue 522</a></strong>
+ Fix use-after-free in logging.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/532">
+ ngx_pagespeed Issue 532</a></strong>
+ Added script to turn apache-format pagespeed_libraries.conf
+ into nginx-format.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/539">
+ ngx_pagespeed Issue 539</a></strong>
+ File cache and logdir are created and given appropriate permissions.
+ </li>
+ </ul>
+
+ <h2 id="release_Oct_2013_Sec">mod_pagespeed October 2013 Security Update</h2>
+ <p> mod_pagespeed releases 1.6.29.7-beta, 1.5.27.4-beta, 1.4.26.5-stable,
+ 1.3.25.5-stable, 1.2.24.2-stable, 1.0.22.8-stable fix
+ <a href="announce-sec-update-201310">critical cross-site scripting (XSS)
+ vulnerability</a>.</p>
+
+ <h2 id="release_1.6.29.7-beta">ngx_pagespeed Release 1.6.29.7-beta</h2>
+ <p> ngx_pagespeed release 1.6.29.7-beta fixes
+ <a href="announce-ngx-sec-update-201310">critical cross-site scripting (XSS)
+ vulnerability</a>.</p>
+
+ <h2 id="release_1.4.26.4-stable">Release 1.4.26.4-stable</h2>
+ <p>This release was made August 7th, 2013. It contains one
+ additional bug fix compared to version
+ <a href="#release_1.4.26.3-stable">1.4.26.3-stable</a>,
+ but is otherwise identical.</p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/683">Issue
+ 683</a></strong> Pagespeed strips cache-control:no-store, etc. headers.
+ </li>
+ </ul>
+
+ <h2 id="release_1.6.29.5-beta">Release 1.6.29.5-beta</h2>
+ <p>This bug-fix release was made July 25, 2013.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/748">
+ Issue 748</a></strong>
+ RewriteRandomDropPercentage cause duplicate image srcs to be blank.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/751">
+ Issue 751</a></strong>
+ Leaked ASM symbol names cause segmentation faults on Apache.</li>
+ </ul>
+
+ <h2 id="release_1.6.29.4-beta">Release 1.6.29.4-beta</h2>
+ <p>This bug-fix release was made July 11, 2013.</p>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/742">
+ Issue 742</a></strong>
+ Broken default pagespeed.conf in 1.6.29.3.</li>
+ </ul>
+
+ <h2 id="release_1.6.29.3-beta">Release 1.6.29.3-beta</h2>
+ <p>This release was made July 10, 2013.</p>
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt><a href="console">PageSpeed Console</a></dt>
+ <dd>The PageSpeed Console monitors your installation's performance and
+ links to general information on how to improve the performance.</dd>
+
+ <dt><a href="downstream-caching">Supporting downstream caches</a></dt>
+ <dd>Experimental feature for supporting caching proxy servers to allow
+ HTML to be cached in these servers.</dd>
+
+ <dt><a href="filter-dedup-inlined-images">dedup_inlined_images</a></dt>
+ <dd>Filter that removes redundant inlined images and replaces them with
+ JavaScript that loads all subsequent uses from the first.</dd>
+
+ <dt><a href="config_filters#RewriteRandomDropPercentage">
+ Randomly drop expensive rewrites</a></dt>
+ <dd>To reduce processing load, PageSpeed can be configured to
+ optimize the most frequently fetched resources, leaving infrequently
+ fetched resources alone. This is accomplished by randomly dropping
+ expensive (CSS and image) rewrites. Frequently fetched resources will
+ have a higher probability of being rewritten than infrequently fetched
+ resources. Over time, frequently accessed resources will be optimized
+ and cached so a page will be fully optimized. Infrequently accessed
+ pages will be left unoptimized or partially optimized, saving CPU time
+ and cache space.</dd>
+
+ <dt><a href="configuration#notransform">DisableRewriteOnNoTransform</a></dt>
+ <dd>Default on, but may be turned off to allow PageSpeed to rewrite
+ resources even if they have a <code>Cache-Control: no-transform</code>
+ header.</dd>
+
+ <dt>Configuration defaults updated</dt>
+ <dd>Starting in this release, we enable lossy image compression by default
+ and update several other default configurations values. Updates:
+ <ul>
+ <li>Default <a href="restricting_urls#aris">
+ AvoidRenamingIntrospectiveJavascript</a> to on (was off).</li>
+ <li>Default <a href="reference-image-optimize#ImageInlineMaxBytes">
+ ImageInlineMaxBytes</a> to 3072 (was 2048).</li>
+ <li>Default <a href="reference-image-optimize#CssImageInlineMaxBytes">
+ CssImageInlineMaxBytes</a> to 0 (was 2048).</li>
+ <li>Default <a href="filter-inline-preview-images#params">
+ MaxInlinedPreviewImagesIndex</a> to -1 = unlimited (was 5).</li>
+ <li>Default <a href="filter-inline-preview-images#params">
+ MinImageSizeLowResolutionBytes</a> to 3072 (was 1024).</li>
+ <li>Default
+ <a href="reference-image-optimize#ImageRecompressionQuality">
+ ImageRecompressionQuality</a> to 85 (was -1 = lossless).</li>
+ <li>Default <a href=
+ "reference-image-optimize#JpegRecompressionQualityForSmallScreens">
+ JpegRecompressionQualityForSmallScreens</a> to 70
+ (was -1 = lossless).</li>
+ <li>Default <a href="reference-image-optimize#WebpRecompressionQuality">
+ WebpRecompressionQuality</a> to 80 (was -1 = lossless).</li>
+ <li>Default <a href=
+ "reference-image-optimize#WebpRecompressionQualityForSmallScreens">
+ WebpRecompressionQualityForSmallScreens</a> to 70
+ (was -1 = lossless).</li>
+ </ul>
+ </dd>
+ </dl>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/199">
+ Issue 199</a></strong>
+ Multiple references to the same small images all get inlined.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/644">
+ Issue 644</a></strong>
+ Improve lazyload behavior.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/675">
+ Issue 675</a></strong>
+ rewrite_javascript breaks Wordpress /wp-admin/ pages with certain
+ common WP plugins.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/683">
+ Issue 683</a></strong>
+ Don't strip Cache-Control:no-store, etc. headers.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/684">
+ Issue 684</a></strong>
+ elide_attributes should not remove type=text as wordpress uses it in
+ CSS.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/690">
+ Issue 690</a></strong>
+ Add originating page URL query-param to beacon URL.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/700">
+ Issue 700</a></strong>
+ Image height tag removed when image is embedded.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/707">
+ Issue 707</a></strong>
+ PageSpeed lost img tag src value when too busy.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/709">
+ Issue 709</a></strong>
+ combine_javascript will kill defer_javascript's pagespeed_no_defer
+ attribute.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/712">
+ Issue 712</a></strong>
+ JS Canonical Library Map is replicated per vhost and per
+ htaccess-subdir.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/719">
+ Issue 719</a></strong>
+ Support random dropping of expensive rewrites.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/721">
+ Issue 721</a></strong>
+ New default values for PSOL options.</li>
+ <li><strong>
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/722">
+ Issue 722</a></strong>
+ rewrite_css should not apply to files with an @import in the middle.</li>
+
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/379">
+ ngx_pagespeed Issue 379</a></strong>
+ Less noise on ngx_pagespeed startup.</li>
+
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/421">
+ ngx_pagespeed Issue 421</a></strong>
+ Rewrite non-HEAD non-GET requests.</li>
+
+ <li><strong>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/427">
+ ngx_pagespeed Issue 427</a></strong>
+ Support <a href="system#rate_limit_background_fetches"
+ >RateLimitBackgroundFetches</a>.</li>
+ </ul>
+
+ <h2 id="release_1.4.26.3-stable">Release 1.4.26.3-stable</h2>
+ <p>This release was made June 5th, 2013. It contains one
+ additional bug fix compared to version
+ <a href="#release_1.4.26.2-beta">1.4.26.2-beta</a>,
+ but is otherwise identical.</p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-mod/issues/710">Issue
+ 710</a></strong> Error message "Index of processing disabled slot
+ out of range" in log file.
+ </li>
+ </ul>
+
+ <h2 id="release_1.5.27.3-beta">Release 1.5.27.3-beta</h2>
+ <p>This release was made May 16th, 2013, and is Nginx-only.</p>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <dl>
+ <dt>Nginx
+ <dd><ul>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/70">Issue
+ 70</a></strong> The pagespeed resources were missing etags.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/284">Issue
+ 284</a></strong> Default <code>FileCacheInodeLimit</code> to 500000
+ and <code>AvoidRenamingIntrospectiveJavascript</code>
+ to <code>on</code> as in mod_pagespeed.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/321">Issue
+ 321</a></strong>
+ The <code>Connection</code>, <code>Vary</code>,
+ <code>Keep-Alive</code>, <code>Transfer-Encoding</code>,
+ and <code>Server</code> headers would sometimes be duplicated.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/323">Issue
+ 323</a></strong> Beacons were being served without cache-control
+ headers.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/330">Issue
+ 330</a></strong> Responses for html would occasionally be cut short.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/337">Issue
+ 337</a></strong> Some pagespeed resources not gzipped.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/366">Issue
+ 366</a></strong> Precompiled binaries incompatible with CentOS 5.
+ </li>
+ <li><strong><a
+ href="https://github.com/apache/incubator-pagespeed-ngx/issues/371">Issue
+ 371</a></strong> Responses for static resources would occasionally be
+ cut short.
+ </li>
+ </ul>
+ </dd>
+ </dl>
+
+ <h2 id="release_1.5.27.2-beta">Release 1.5.27.2-beta</h2>
+ <p>This release was made May 6th, 2013 for Apache and April 29th, 2013
+ for Nginx.</p>
+ <h3 class="hide-from-toc">Highlights</h3>
+ <p>
+ We have modified or added filters to do in-browser analysis of your pages
+ and report the results back to PageSpeed, allowing it to further optimize
+ the pages for subsequent visitors.
+ </p>
+ <p>
+ The new prioritize_critical_css filter instruments your pages to determine
+ the CSS rules actually used to render them and inlines just those rules;
+ this permits the browser to style the page without fetching external
+ resources, which is especially important for mobile browsing where it can
+ take hundreds of milliseconds to establish a fresh connection.
+ </p>
+ <p>
+ The inline_images, inline_preview_images, and lazyload_images filters now
+ instrument the page to determine the images that are above the fold so as
+ to optimize just them, thereby displaying what the user sees faster.
+ </p>
+ <p>
+ Support for
+ <a href="https://developers.google.com/speed/pagespeed/ngx">Nginx</a>.
+ </p>
+ <h3 class="hide-from-toc">New Features</h3>
+ <ul>
+ <li>The
+ <a href="filter-lazyload-images">lazyload_images</a>
+ filter now uses
+ <a href="filter-lazyload-images#beacons">beacons</a>
+ to determine the above-the-fold images.
+ </li>
+ <li>The
+ <a href="filter-inline-preview-images">inline_preview_images</a>
+ filter now uses
+ <a href="filter-inline-preview-images#beacons">beacons</a>
+ to determine the above-the-fold images.
+ </li>
+ <li>
+ The
+ <a href="reference-image-optimize#inline_images">inline_images</a>
+ filter now uses
+ <a href="filter-image-optimize#inline_beacons">beacons</a>
+ to determine the above-the-fold images; as this is a core filter, beacons
+ will now be used if your RewriteLevel is CoreFilters and you have not
+ <a href="faq#control_beacons">explicitly disabled this filter and/or
+ beacons</a>.
+ </li>
+ <li>
+ <a href="config_filters#beacons">Beacon handling</a>
+ has changed so that by default they are now handled automatically -
+ Apache no longer requires a Location directive although one can be used
+ to <a href="faq#disable_handler">disable beaconing</a>.
+ </li>
+ </ul>
+ <h3 class="hide-from-toc">New Filters</h3>
+ <dl>
+ <dt>
+ <a href="filter-prioritize-critical-css">prioritize_critical_css</a>
+ </dt>
+ <dd>
+ Inline only the CSS used by the page.
+ </dd>
+ </dl>
+ <h3 class="hide-from-toc">New Configuration Options</h3>
+ <ul>
+ <li>
+ <a href="config_filters#beacons">CriticalImagesBeaconEnabled</a>
+ </li>
+ <li>
+ <a href="reference-image-optimize#JpegNumProgressiveScans"
+ >ImageJpegNumProgressiveScans</a>
+ </li>
+ <li>
+ <a href="reference-image-optimize#JpegNumProgressiveScansForSmallScreens"
+ >ImageJpegNumProgressiveScansForSmallScreens</a>
+ </li>
+ <li>
+ <a href="reference-image-optimize#WebpRecompressionQuality"
+ >WebpRecompressionQuality</a>
+ </li>
+ <li>
+ <a href="reference-image-optimize#WebpRecompressionQualityForSmallScreens"
+ >WebpRecompressionQualityForSmallScreens</a>
+ </li>
+ </ul>
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/109">Issue
+ 109</a></strong> Make it easy to install on cPanel EasyInstall.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/508">Issue
+ 508</a></strong> Large numbers get rewritten to scientific notation.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/672">Issue
+ 672</a></strong> Disable setting more than one thread for memcached.
+ </li>
+ </ul>
+
+ <h2 id="release_1.3.25.4-stable">Release 1.3.25.4-stable</h2>
+ <p>
+ This release was made May 3rd, 2013. It is a clone of the
+ <a href="#release_1.3.25.4-beta">1.3.25.4-beta release.</a>
+ </p>
+
+ <h2 id="release_1.4.26.2-beta">Release 1.4.26.2-beta</h2>
+ <p>This release was made April 4th, 2013. It fixes a bug that caused
+ the <code>convert_meta_tags</code> filter to incorrectly propagate
+ XHTML mimetypes from some <code><meta http-equiv></code> elements
+ to HTTP headers.
+ </p>
+
+ <h2 id="release_1.4.26.1-beta">Release 1.4.26.1-beta</h2>
+ <p>This release was made April 3rd, 2013.</p>
+
+ <h3 class="hide-from-toc">New Features</h3>
+ <dl>
+ <dt>
+ <a href="system#ipro">In-Place Resource Optimization</a>
+ </dt>
+ <dd>PageSpeed can now optimize resources accessed directly from
+ their original URLs, not just those rewritten with the PageSpeed URL
+ format. This can be useful for optimizing resources referenced from other
+ sites and from JavaScript.</dd>
+
+ <dt>
+ <a href="config_filters#preserveurls">Preserve URLs</a>
+ </dt>
+ <dd>
+ Prevents PageSpeed from rewriting URLs in HTML files and instead
+ relies on <a href="system#ipro">In-Place Resource Optimization</a> for
+ resource optimization. This can be useful when it is necessary to be
+ conservative about altering the pages that PageSpeed serves, such as
+ in a forward proxy.
+ </dd>
+
+ <dt>
+ <a href="system#shm_cache">Shared Memory Metadata Cache</a>
+ </dt>
+ <dd>An in-memory cache that shares metadata entries between Apache
+ processes on the same server. This can provide significant performance
+ benefits.</dd>
+
+ <dt>
+ <a href="experiment#Client-Options">Client Options Header</a>
+ </dt>
+ <dd>Support for a new request header that can be used to configure
+ image optimizations.</dd>
+
+ <h3 class="hide-from-toc">Issues Resolved</h3>
+ <ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/213">Issue
+ 213</a></strong> Fetches for same-domain resources failing with
+ reference to 224.0.0.0 or 127.0.0.1
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/572">Issue
+ 572</a></strong> Optimize images referenced from JS
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/609">Issue
+ 609</a></strong> ModPagespeedMapProxyDomain does not proxy
+ non-optimized resources
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/615">Issue
+ 615</a></strong> Rewriting domains does not work with
+ ModPagespeedMapProxyDomain
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/629">Issue
+ 629</a></strong> insert_image_dimensions on <link>-elements causing
+ invalid document
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/630">Issue
+ 630</a></strong> CSS parser incorrectly parses "1.em" as "1em"
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/649">Issue
+ 649</a></strong> defer_javascript and defer_iframes not turned on for
+ Mobile
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/650">Issue
+ 650</a></strong> Images inlined for CSS inlines in HTML even when
+ CssImageInlineMaxBytes is zero
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/652">Issue
+ 652</a></strong> Last-Modified header should not be stripped with ...
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/656">Issue
+ 656</a></strong> Compile with GCC 4.7
+ </li>
+ </ul>
+
+<h2 id="release_1.3.25.4-beta">Release 1.3.25.4-beta</h2>
+<p>
+This release was made March 20, 2013. It is a bug fix release.
+</p>
+<h3 class="hide-from-toc">Issues Resolved</h3>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/648">Issue
+ 648</a></strong>
+ Combine_css and combine_javascript loses subdirectories occasionally
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/641">Issue
+ 641</a></strong>
+ Lazyload Images Defect on Blackberry Browser w/ OS <= 5
+ </li>
+</ul>
+
+<h2 id="release_1.2.24.1-stable">Release 1.2.24.1-stable</h2>
+<p>
+This release was made March 14, 2013.
+It is a clone of the <a href="#release_1.2.24.1-beta">1.2.24.1-beta release.</a>
+</p>
+
+<h2 id="release_1.3.25.3-beta">Release 1.3.25.3-beta</h2>
+<p>
+This release was made February 26, 2013. It fixes a bug in
+1.3.25.2 and 1.3.25.1 that caused excessive log messages to
+be generated on SSL connections.
+</p>
+
+<h2 id="release_1.3.25.2-beta">Release 1.3.25.2-beta</h2>
+<p>
+This release was made February 19, 2013. It fixes a bug in
+1.3.25.1 that caused disk caches to not get cleaned.
+</p>
+
+<h2 id="release_1.3.25.1-beta">Release 1.3.25.1-beta</h2>
+<p>
+This release was made February 15, 2013.
+</p>
+
+<h3 class="hide-from-toc">New Features</h3>
+<dl>
+ <dt><a href="reference-image-optimize#convert_to_webp_lossless">
+ Lossless & transparent WebP support.</a></dt>
+ <dd>PageSpeed can now take advantage of support for lossless &
+ transparent WebP images in some newer browsers,
+ <a href="/speed/webp/docs/webp_lossless_alpha_study#results">which can
+ provide smaller file sizes than PNG.</a></dd>
+
+ <dt><a href="config_filters#add_options_to_urls">Embedding configuration into
+ resource URLs.</a></dt>
+ <dd>You can now configure PageSpeed to embed image & CSS optimization
+ settings in resource URLs. This is useful in multi-server setups where
+ perfectly replicating configuration information may be infeasible.</dd>
+
+ <dt><a href="domains#MapProxyDomain">Better CDN support in MapProxyDomain.
+ </a></dt>
+ <dd>You can now optionally provide a third argument to
+ <a href="domains#MapProxyDomain">ModPagespeedMapProxyDomain</a> in order
+ to use a domains of a separate hosting site for optimized resources
+ being proxied.</dd>
+
+ <dt><a href="filter-lazyload-images">IE6/IE7 support in lazy load images</a>
+ </dt>
+ <dd>The lazy load images filter now also applies for visitors using
+ Internet Explorer versions 6 and 7.</dd>
+
+ <dt><a href="system#shm_lock_manager">Shared memory named locks are now on by
+ default.</a></dt>
+ <dd>This reduces file system load when resources are being optimized.</dd>
+</dl>
+
+<h3 class="hide-from-toc">New Filters</h3>
+<dl>
+ <dt><a href="reference-image-optimize#convert_to_webp_lossless">
+ convert_to_webp_lossless</a>
+ </dt>
+ <dd>Re-compresses GIF and PNG images to lossless WebP.</dd>
+</dl>
+
+<h3 class="hide-from-toc">Changes to Configuration Options</h3>
+<ul>
+<li>
+ <a href="config_filters#add_options_to_urls">ModPagespeedAddOptionsToUrls</a>
+ added
+</li>
+<li>
+ 3-argument version of
+ <a href="domains#MapProxyDomain">ModPagespeedMapProxyDomain</a> added
+</li>
+<li>
+ <a href="filter-instrumentation-add#beacon_url">ModPagespeedBeaconUrl</a>
+ arguments no longer required to end in <code>?ets=</code>
+</li>
+</ul>
+
+<h3 class="hide-from-toc">Issues Resolved</h3>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/322">Issue
+ 322</a></strong>
+ We should not rewrite <img src=... width=1 height=1> to 1x1
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/563">Issue
+ 563</a></strong>
+ Use shared-memory locks by default
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/581">Issue
+ 581</a></strong>
+ lazyload_images should be enabled for IE6/IE7
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/582">Issue
+ 582</a></strong>
+ CSS returns 403 Forbidden with some proxy configurations
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/587">Issue
+ 587</a></strong>
+ Pagespeed should respect Cache-Control: no-transform
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/591">Issue
+ 591</a></strong>
+ File cache cleaner improperly removing lock files
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/599">Issue
+ 599</a></strong>
+ Support ModPagespeedMapProxyDomain to CDN
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/600">Issue
+ 600</a></strong>
+ Proxied resources aren't combined with local resources
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/601">Issue
+ 601</a></strong>
+ InitializeNested in CssHierarchy initializes a StringPiece with too wide
+ a scope
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/608">Issue
+ 608</a></strong>
+ ModPagespeed=off with no filecachepath causes problems with .pagespeed.
+ resources
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/610">Issue
+ 610</a></strong>
+ Crash with some proxy configurations
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/614">Issue
+ 614</a></strong>
+ CSS: minify 0.25 -> .25
+ </li>
+
+</ul>
+
+<h2 id="release_1.2.24.1-beta">Release 1.2.24.1-beta</h2>
+<p>
+This release was made December 14, 2012.
+</p>
+
+<h3 class="hide-from-toc">New Features</h3>
+<dl>
+ <dt><a href="domains#MapProxyDomain">Proxying and optimizing resources from
+ trusted domains</a></dt>
+ <dd>It is now possible to proxy and optimize resources whose origin is a
+ trusted domain but isn’t itself running PageSpeed.</dd>
+ <dt><a href="reference-image-optimize#pagespeed_no_transform">pagespeed_no_transform
+ attribute for images</a></dt>
+ <dd>The 'Optimize Images' filter won't optimize an image (though it might
+ still cache extend it) if it has the pagespeed_no_transform attribute.</dd>
+ <dt><a href="reference-image-optimize#progressive">convert_jpeg_to_progressive</a>
+ is now a core filter</dt>
+ <dd>The convert_jpeg_to_progressive filter is now enabled by default when
+ ModPagespeedRewriteLevel is CoreFilters.</dd>
+ <dt><a href="build_from_source#js-minify">Standalone JS Minification</a></dt>
+ <dd>A command-line JavaScript minifier is now installed when you install
+ PageSpeed. This generates the same minified code as PageSpeed
+ itself.</dd>
+ <dt><a href="config_filters#checking-filter-config">Show configuration from
+ /mod_pagespeed_statistics</a></dt>
+ <dd>The /mod_pagespeed_statistics page (if enabled) now has a Configuration
+ link that shows the filters enabled on the virtual host.</dd>
+ <dt>Better handling of CSS</dt>
+ <dd>The CSS parser now treats sections it doesn't understand as unparseable
+ sections, which are left unoptimized but no longer completely stop the
+ parser. Among other things this allows files containing such sections to
+ be combined per
+ <a href="http://github.com/apache/incubator-pagespeed-mod/issues/565">issue
+ 565</a> as described below.</dd>
+</dl>
+
+<h3 class="hide-from-toc">New Filters</h3>
+<dl>
+ <dt><a href="filter-insert-dns-prefetch">insert_dns_prefetch</a></dt>
+ <dd>Reduce DNS lookup time by pre-resolving at the browser.</dd>
+ <dt><a href="filter-canonicalize-js">canonicalize_javascript_libraries</a></dt>
+ <dd>Identifies popular JavaScript libraries that can be replaced with ones
+ hosted by a JavaScript library hosting service.</dd>
+</dl>
+
+<h3 class="hide-from-toc">New Configuration Options</h3>
+<pre class="prettyprint">
+ <a href="experiment#ModPagespeedFilters">ModPagespeedCssFlattenMaxBytes</a>
+ <a href="config_filters#enabling">ModPagespeedForbidFilters</a>
+ <a href="config_filters#forbidding">ModPagespeedForbidAllDisabledFilters</a>
+ <a href="system#memcached">ModPagespeedMemcachedTimeoutUs</a>
+ <a href="system#rewrite_deadline">ModPagespeedRewriteDeadlinePerFlushMs</a>
+ <a href="restricting_urls#content_length">ModPagespeedMaxCacheableContentLength</a>
+</pre>
+
+<h3 class="hide-from-toc">Issues Resolved</h3>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/199">Issue
+ 199</a></strong>
+ multiple references to the same small images all get inlined
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/259">Issue
+ 259</a></strong>
+ Provide a way to turn off query-params
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/349">Issue
+ 349</a></strong>
+ Serf internal error 20014 in sporadic bursts
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/367">Issue
+ 367</a></strong>
+ PageSpeed strips custom HTML headers
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/501">Issue
+ 501</a></strong>
+ Add ability to set maximum size of a resource for PageSpeed to optimize
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/516">Issue
+ 516</a></strong>
+ add attribute-based mechanism to disable rewriting a resource
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/533">Issue
+ 533</a></strong>
+ Look at response-headers in addition to request-headers/query-params for
+ ModPagespeed=* options
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/557">Issue
+ 557</a></strong>
+ Add feature to proxy resources whose origin servers don't run PageSpeed
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/565">Issue
+ 565</a></strong>
+ css_combine overly pessimistic (should combine even if CSS cannot be fully
+ parsed)
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/571">Issue
+ 571</a></strong>
+ Add option to set rewrite deadline from config
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/573">Issue
+ 573</a></strong>
+ local storage cache doesn't work
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/574">Issue
+ 574</a></strong>
+ CSS compress removes quotes and backslashes
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/575">Issue
+ 575</a></strong>
+ CSS selector broken by removing quote
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/585">Issue
+ 585</a></strong>
+ convert_jpeg_to_progressive should be added to core-filter-set
+ </li>
+</ul>
+
+<h2 id="release_1.1.23.2-stable">Release 1.1.23.2-stable</h2>
+<p>
+This release was made December 5, 2012.
+It is a clone of the 1.1.23.2-beta release.
+</p>
+
+<h2 id="release_1.1.23.2-beta">Release 1.1.23.2-beta</h2>
+<p>
+This release was made November 15, 2012.
+</p>
+<h3 class="hide-from-toc">Issues Resolved</h3>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/567">Issue
+ 567</a></strong>
+ [error] "Shutting down PageSpeed child" after binary upgrade
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/568">Issue
+ 568</a></strong>
+ Cache Flush reported excessively
+ </li>
+ <li>
+ Excessive logging when image type is not detected
+ </li>
+ <li>
+ Fix Lintian warning when installing deb package
+ </li>
+</ul>
+
+<h2 id="release_1.1.23.1-beta">Release 1.1.23.1-beta</h2>
+<p>
+This release was made November 12, 2012.
+</p>
+<h3 class="hide-from-toc">New Features</h3>
+<dl>
+ <dt><a href="system#memcached">memcached support</a>
+ <dd>PageSpeed now includes support for using <a
+ href="http://memcached.org/">memcached</a> as an alternative to the
+ file-based cache. Using memcached allows multiple servers to share optimized
+ resources, reducing server load and improving resource utilization.
+ <dt><a href="https_support#spdy_configuration">SPDY configuration support</a>
+ <dd>PageSpeed can now be conditionally configured to behave differently
+ when accessed through SPDY.
+ <dt>CSS3 support
+ <dd>Parsing of @media tags is now supported, and handling of unsupported @
+ tags no longer causes parsing to fail.
+ <dt><a href="configuration#virtual-hosts-and-stats">Per-Vhost statistics</a>
+ <dd>PageSpeed_statistics can now provide statistics on a per-vhost
+ basis, through the ModPagespeedUsePerVHostStatistics option.
+ <dt>Expanded default filter set
+ <dd><a href="filter-flatten-css-imports">flatten_css_imports</a> and <a
+ href="filter-css-rewrite">fallback_rewrite_css_urls</a> are now enabled in
+ <a href="config_filters">CoreFilters</a>.
+ <dt><a href="build_from_source#debug-css">Standalone CSS parser</a>
+ <dd>In situations where PageSpeed is unable to minify a CSS resource,
+ the new standalone CSS parser can be used to debug why the CSS file could
+ not parsed.
+</dl>
+
+<h3 class="hide-from-toc">New Filters</h3>
+<dl>
+ <dt><a href="filter-cache-extend-pdfs">extend_cache_pdfs</a>
+ <dd>Extends the cache lifetime of PDFs. This is beneficial when using a CDN,
+ as the CDN can now serve PDFs without having to check the freshness of the
+ content with the origin, while still remaining responsive to PDF updates.
+ <dt><a href="filter-css-rewrite">fallback_rewrite_css_urls</a>
+ <dd>Enables rewriting of URLs in CSS files if the CSS cannot successfully be
+ parsed. This filter is in the CoreFilters set.
+ <dt><a href="filter-pedantic">pedantic</a>
+ <dd>This filter makes PageSpeed more HTML4 compliant by adding type
+ attributes to style and script tags. This filter is not needed in most
+ cases, as adding those attributes has no effect, but it can be enabled to
+ fix errors reported by HTML validators.
+ <dt>Enhanced image rewrite filter control
+ <dd>Finer-grained control for <a href="filter-image-optimize">image rewrite
+ optimizations</a> is now provided. Individual filters are now exposed for
+ metadata removal and image conversion.
+</dl>
+
+<h3 class="hide-from-toc">New Configuration Options</h3>
+<pre class="prettyprint">
+ <a href="experiment#ModPagespeedFilters">ModPagespeedCssFlattenMaxBytes</a>
+ <a href="config_filters#custom-fetch-headers">ModPagespeedCustomFetchHeader</a>
+ <a href="https_support#spdy_configuration"><ModPagespeedIf></a>
+ <a href="reference-image-optimize#ImageRecompressionQuality">
+ ModPagespeedImageRecompressionQuality</a>
+ <a href="reference-image-optimize#ImageRecompressionQuality">
+ ModPagespeedWebpRecompressionQuality</a>
+ <a href="domains#ModPagespeedLoadFromFile">ModPagespeedLoadFromFileMatch</a>
+ <a href="system#memcached">ModPagespeedMemcachedServers</a>
+ <a href="system#memcached">ModPagespeedMemcachedThreads</a>
+ <a href="system#file_cache">ModPagespeedFileCacheInodeLimit</a>
+ <a href="configuration#virtual-hosts">ModPagespeedInhertVHostConfig</a>
+ <a href="configuration#virtual-hosts-and-stats">ModPagespeedUsePerVHostStatistics</a>
+ <a href="https_support#RespectXForwardedProto">ModPagespeedRespectXForwardedProto</a>
+</pre>
+
+<h3 class="hide-from-toc">Issues Resolved</h3>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/177">Issue
+ 177</a></strong>
+ mod_pagespeed_beacon returns 404 with VirtualHost
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/335">Issue
+ 335</a></strong>
+ Fetching sharded resource from original domain
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/373">Issue
+ 373</a></strong>
+ Default locations for cache/generated files should respect the FHS
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/377">Issue
+ 377</a></strong>
+ Add wildcard support to ModPagespeedLoadFromFile
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/392">Issue
+ 392</a></strong>
+ Lazyily Load Images on Webkit Browsers and the Image Input Element
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/411">Issue
+ 411</a></strong>
+ first 3 histograms under /mod_pagespeed_statistics are empty
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/416">Issue
+ 416</a></strong>
+ outline_css does not inherit CDN rewrite rules from
+ ModPagespeedMapRewriteDomain
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/426">Issue
+ 426</a></strong>
+ Unicode value 0x0 is not valid for interchange
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/430">Issue
+ 430</a></strong>
+ Per VHOST mod_pagespeed_statistics
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/434">Issue
+ 434</a></strong>
+ Provide a pagespeed.conf option to append a custom Header (key->value)
+ to the Serf fetcher
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/439">Issue
+ 439</a></strong>
+ Use mimetype rather than doctype for HTML decisions
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/448">Issue
+ 448</a></strong>
+ mod_pagespeed_message uses wrong timezone
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/449">Issue
+ 449</a></strong>
+ Do not strip image dimensions when an inlined image is enlarged
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/450">Issue
+ 450</a></strong>
+ disable sharding when running under SPDY in general, mod_spdy in
+ particular
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/454">Issue
+ 454</a></strong>
+ mod_pagespeed_ap24.so: cannot open shared object file: No such file or
+ directory
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/457">Issue
+ 457</a></strong>
+ Resource regeneration doesn't respect custom options
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/461">Issue
+ 461</a></strong>
+ LoadFromFile blacklist support
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/462">Issue
+ 462</a></strong>
+ file cache should enforce a maximum inode count.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/463">Issue
+ 463</a></strong>
+ collapse_whitespace missing whitespace removal in one location
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/475">Issue
+ 475</a></strong>
+ Add memcached support as an alternative to the file-based cache.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/477">Issue
+ 477</a></strong>
+ Blacklist Android Chrome for webp conversion
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/480">Issue
+ 480</a></strong>
+ defer_javascript should turn off for requests with header XMLHttpRequest
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/488">Issue
+ 488</a></strong>
+ LoadFromFile + memcached -> meta-data cache timestamp problems
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/490">Issue
+ 490</a></strong>
+ Make css_flatten_imports a core filter
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/491">Issue
+ 491</a></strong>
+ inline_import_to_link should handle multiple @import statements
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/493">Issue
+ 493</a></strong>
+ Is trim_urls in core filter set?
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/494">Issue
+ 494</a></strong>
+ pagespeed css fetched by CDN result in cache-control:private,max-age=300
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/495">Issue
+ 495</a></strong>
+ VirtualHosts should inherit configuration from root
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/499">Issue
+ 499</a></strong>
+ Page load count based on actual HTML rewrites (not beacon count)
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/517">Issue
+ 517</a></strong>
+ lazyload_images should respect ModPagespeedDisallow directive
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/523">Issue
+ 523</a></strong>
+ Rewrite <link rel="alternative stylesheet">
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/529">Issue
+ 529</a></strong>
+ convert_gif_to_png doc is missing
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/532">Issue
+ 532</a></strong>
+ webmin through an apache proxy fails
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/535">Issue
+ 535</a></strong>
+ cache size explosion issue due to css in style tags
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/536">Issue
+ 536</a></strong>
+ file-cache should count disk usage, not byte-count, when doing garbage
+ collection
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/542">Issue
+ 542</a></strong>
+ Site with html in CDATA tag in script tag gets broken by rewrite_javascript
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/546">Issue
+ 546</a></strong>
+ Respect X-Forwarded-Proto
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/549">Issue
+ 549</a></strong>
+ Make unit tests & system tests work in open-source flow without
+ memcached running.
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/555">Issue
+ 555</a></strong>
+ 5 configuration settings documented as being settable in .htaccess don't
+ work there.
+</ul>
+
+<h2 id="release_1.0.22.7-stable">Release 1.0.22.7</h2>
+<p>
+This release was made October 11, 2012. It is functionally identical to release
+0.10.22.7.
+</p>
+
+<h2 id="release_0.10.22.7">Release 0.10.22.7</h2>
+<p>
+This release was made September 28, 2012. It adds
+the <code>pagespeed.conf</code> configuration option <a
+href="domains#fetch_servers"><code
+>ModPagespeedDangerPermitFetchFromUnknownHosts</code></a>.
+</p>
+
+<h2 id="release_0.10.22.6">Release 0.10.22.6</h2>
+<p>
+This release was made September 12, 2012. It is a security update addressing
+two high-priority issues, as further described in
+<a href="announce-0.10.22.6.html">this article</a>.
+</p>
+
+<h2 id="release_0.10.22.4">Release 0.10.22.4</h2>
+<p>
+This release was made Jun 1, 2012. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/133">Issue
+ 133</a></strong>
+ Provide easier mechanism to flush server cache
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/152">Issue
+ 152</a></strong>
+ Add support and testing for Worker MPM
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/253">Issue
+ 253</a></strong>
+ combine_css should scan for syntax errors to avoid combining broken
+ files
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/289">Issue
+ 289</a></strong>
+ Problem Compiling ModPagespeed on Arch Linux
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/321">Issue
+ 321</a></strong>
+ Hide or obfuscate X-Mod-Pagespeed header
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/334">Issue
+ 334</a></strong>
+ PageSpeed uses too many threads -- in proportion to the number
+ of vhosts
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/349">Issue
+ 349</a></strong>
+ Serf internal error 20014 in sporadic bursts
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/375">Issue
+ 375</a></strong>
+ fails to compile on linux kernel 3.0+
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/380">Issue
+ 380</a></strong>
+ Mod PageSpeed 0.10.21.2-1381 fails to retrieve combined objects with error,
+ "Invalid escaped URL segment"
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/386">Issue
+ 386</a></strong>
+ Deadline exceeded for rewrite
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/393">Issue
+ 393</a></strong>
+ Mod Pagespeed breaks JqueryMobile ajax request
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/405">Issue
+ 405</a></strong>
+ ModPagespeedLoadFromFile doesn't set the Content-Type correctly when query
+ params exist
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/409">Issue
+ 409</a></strong>
+ add_instrumentation filter breaks JS execution
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/417">Issue
+ 417</a></strong>
+ Javascript injected into page by PageSpeed is not minified
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/425">Issue
+ 425</a></strong>
+ HTML URL attributes with multi-byte characters may be misinterpreted
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/427">Issue
+ 427</a></strong>
+ compress stylesheet url fails to decode when optimized by pagespeed
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/428">Issue
+ 428</a></strong>
+ <a href="filter-domain-rewrite#DomainRewriteHyperlinks"
+ >DomainRewriteHyperlinks</a> should not work with Domain Sharding
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/442">Issue
+ 442</a></strong>
+ lazyload_images triggers a JavaScript error on Internet Explorer 8
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/444">Issue
+ 444</a></strong>
+ Relative URLs are not absolutified in unparseable CSS
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/445">Issue
+ 445</a></strong>
+ CSS rewriters don't handle a CSS file having a BOM
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/446">Issue
+ 446</a></strong>
+ Handle BOMs in JS better when combining
+ </li>
+</ul>
+<p>
+This release adds some new <code>pagespeed.conf</code> options:
+</p>
+<pre class="prettyprint">
+ <a href="restricting_urls#aris">AvoidRenamingIntrospectiveJavascript</a>
+ <a href="filter-domain-rewrite#DomainRewriteHyperlinks"
+ >DomainRewriteHyperlinks</a>
+ <a href="configuration#XHeaderValue">XHeaderValue</a>
+ <a href="system#purge_options">CacheFlushPollIntervalSec</a>
+ <a href="system#purge_options">CacheFlushFilename</a>
+ <a href="filter-instrumentation-add#methodology">ReportUnloadTime</a>
+ <a href="configuration#ListOutstandingUrlsOnError"
+ >ListOutstandingUrlsOnError</a>
+ <a href="system#tune_thread">NumExpensiveRewriteThreads</a>
+ <a href="system#tune_thread">NumRewriteThreads</a>
+ <a href="filter-insert-ga">AnalyticsID</a>
+</pre>
+<p>
+This release includes the following miscellanea:
+</p>
+<ul>
+ <li>The handling of HTML escapes in element attributes has been made more
+ robust.</li>
+ <li>We are removing "trim_urls" from the Core set to better support Ajax
+ loading of HTML from a different path
+ (<a href="http://github.com/apache/incubator-pagespeed-mod/issues/393">Issue
+ 393</a>).</li>
+ <li>Improved memory efficiency during HTML parsing and rewriting of large
+ documents. Many improvements to quality and performance of the rewriting
+ engine.</li>
+</ul>
+<h2 id="release_0.10.21.2">Release 0.10.21.2</h2>
+<p>
+This release was made Feb 8, 2012. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/48">Issue
+ 48</a></strong>
+ Support for CSS @import
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/108">Issue
+ 108</a></strong>
+ Parse CSS3 and common proprietary syntaxes
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/186">Issue
+ 186</a></strong>
+ Wysiwyg 2.2 and CKEditor 3.5 on Drupal + PageSpeed breaks
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/196">Issue
+ 196</a></strong>
+ InlineCss not parsing @import "url" statements
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/214">Issue
+ 214</a></strong>
+ insert_image_dimensions can break an image's aspect ratio
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/332">Issue
+ 332</a></strong>
+ LoadFromFile should convert %20 to space in URLs
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/338">Issue
+ 338</a></strong>
+ combine_css needs to strip BOM markers before combining
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/340">Issue
+ 340</a></strong>
+ terminate called after throwing an instance of 'std::length_error'
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/352">Issue
+ 352</a></strong>
+ Lightbox2 + PageSpeed not working
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/354">Issue
+ 354</a></strong>
+ CSS filter ignores external CSS links with <code>rel='Stylesheet'</code>
+ instead of <code>rel='stylesheet'</code>
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/355">Issue
+ 355</a></strong>
+ DoS under Debian/apache2-mpm-itk
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/356">Issue
+ 356</a></strong>
+ Sites with HTTPS users and no HTTPS PageSpeed configuration get log spew
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/367">Issue
+ 367</a></strong>
+ PageSpeed strips custom HTML headers
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/368">Issue
+ 368</a></strong>
+ Relative URL not handled properly in inlined css
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/372">Issue
+ 372</a></strong>
+ meta refresh tags within NOSCRIPT tags get converted to HTTP headers even
+ when javascript is enabled
+ </li>
+</ul>
+
+<h2 id="release_0.10.19.5">Release 0.10.19.5</h2>
+<p>
+This release was made Dec 12, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/355">Issue
+ 355</a></strong>
+ DoS under Debian/apache2-mpm-itk
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/357">Issue
+ 357</a></strong>
+ ModPagespeedLoadFromFile should strip query params.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/360">Issue
+ 360</a></strong>
+ meta-tag charset breaks opera.
+ </li>
+</ul>
+
+<h2 id="release_0.10.19.3">Release 0.10.19.3</h2>
+<p>
+This release was Nov 29, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/249">Issue
+ 249</a></strong>
+ Rewrite CSS in style tags
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/295">Issue
+ 295</a></strong>
+ Incorrectly resolved relative urls in rewritten CSS
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/303">Issue
+ 303</a></strong>
+ Trim URLs in CSS that were absolutified
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/324">Issue
+ 324</a></strong>
+ Non-caching-related headers are stripped from resources
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/338">Issue
+ 338</a></strong>
+ combine_css needs to strip BOM markers before combining
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/344">Issue
+ 344</a></strong>
+ combine_javascript not combining javascript when names became too long
+ </li>
+</ul>
+
+<h2 id="release_0.9.18.6">Release 0.9.18.6</h2>
+<p>
+This release was made Aug 4, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/103">Issue
+ 103</a></strong>
+ Pay attention to Vary headers for caching of sub-responses
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/143">Issue
+ 143</a></strong>
+ Switch resizing algorithm to CV_INTER_AREA
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/215">Issue
+ 215</a></strong>
+ Statistics failing with "cannot lock mutex: Invalid argument"
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/229">Issue
+ 229</a></strong>
+ Inline images sent to browsers that don't support inline images
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/241">Issue
+ 241</a></strong>
+ Respect Vary headers for resources
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/247">Issue
+ 247</a></strong>
+ HtmlElement::AttributeValue returns NULL ambiguity
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/265">Issue
+ 265</a></strong>
+ Serf unittest failure outside USA because of redirect
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/300">
+ Issue 300</a></strong>
+ Recurrence of <a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/285">Issue
+ 285</a> under X-Mod-Pagespeed:0.9.17.7-716
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/301">Issue
+ 301</a></strong>
+ Add WebP support for image compression
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/306">Issue
+ 306</a></strong>
+ combine_css emits "<link ...>" without the proper "/" before the
+ ">" with doctype XHTML
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/309">Issue
+ 309</a></strong>
+ Preserve CDATA tags on scripts in XHTML
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/311">Issue
+ 311</a></strong>
+ rewrite_domains cuts off dynamic parts of image URLs
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/314">Issue
+ 314</a></strong>
+ Some user agents don't understand protocol-relative urls in some
+ circumstances
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/316">Issue
+ 316</a></strong>
+ Don't include image-in-page dimensions when resizing is off
+ </li>
+</ul>
+
+<h2 id="release_0.9.17.6">Release 0.9.17.6</h2>
+<p>
+This release was made May 16, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/285">Issue
+ 285</a></strong>
+ Removing cache per FAQ causes PageSpeed to re-create "cache" location
+ with root permissions
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/287">Issue
+ 287</a></strong>
+ combine_javascript conflict with rewrite_domains
+ </li>
+</ul>
+
+<h2 id="release_0.9.17.3">Release 0.9.17.3</h2>
+<p>
+This release was made May 6, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/71">Issue
+ 71</a></strong>
+ Apache cannot restart if too many mutices from stats remain from unclean
+ exits
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/97">Issue
+ 97</a></strong>
+ Keep relative URLs relative after rewrite.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/104">Issue
+ 104</a></strong>
+ CSS optimizations are conservative in the presence of extra attributes
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/116">Issue
+ 116</a></strong>
+ Need documentation describing how to configure VirtualHost with
+ PageSpeed
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/173">Issue
+ 173</a></strong>
+ Rewrite resources when that moves them to a new domain
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/181">Issue
+ 181</a></strong>
+ Filters need to check that they do not make URLs that are too long
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/182">Issue
+ 182</a></strong>
+ Server-side includes are stripped by remove_comments and rewrite_css
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/194">Issue
+ 194</a></strong>
+ conflict with mod_speling
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/237">Issue
+ 237</a></strong>
+ need a way to selectively keep some comments
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/238">Issue
+ 238</a></strong>
+ outline_javascript generating broken links
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/239">Issue
+ 239</a></strong>
+ Add support of GIF files in rewrite_images filter, both from HTML and CSS
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/248">Issue
+ 248</a></strong>
+ Inappropriately converting / -> /index.html while mirroring sites with
+ Slurping
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/252">Issue
+ 252</a></strong>
+ combine_css on XHTML file with unbalanced tags can strip elements
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/255">Issue
+ 255</a></strong>
+ script tags missing from rewritten HTML output after inlined css
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/264">Issue
+ 264</a></strong>
+ domain sharding & rewriting should apply to resources that are not
+ cacheable
+ </li>
+</ul>
+
+<h2 id="release_0.9.16.9">Release 0.9.16.9</h2>
+<p>
+This release was made March 16, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/182">Issue
+ 182</a></strong>
+ Server-side includes are stripped by remove_comments and rewrite_css
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/194">Issue
+ 194</a></strong>
+ conflict with mod_speling
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/234">Issue
+ 234</a></strong>
+ Wrong document URL when mod_rewrite used
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/235">Issue
+ 235</a></strong>
+ Invalid command 'ModPagespeedLowercaseHtmlNames'
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/238">Issue
+ 238</a></strong>
+ outline_javascript generating broken links
+ </li>
+</ul>
+
+<h2 id="release_0.9.16.3">Release 0.9.16.3</h2>
+<p>
+This release was made March 9, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/74">Issue
+ 74</a></strong>
+ Wrong Hostname in relative path with mod_proxy
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/83">Issue
+ 83</a></strong>
+ Add domain sharding
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/87">Issue
+ 87</a></strong>
+ Optimize images in css files
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/153">Issue
+ 153</a></strong>
+ Treat the entire input file, including tags and attribute names, as case
+ sensitive
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/173">Issue
+ 173</a></strong>
+ Rewrite resources when that moves them to a new domain
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/183">Issue
+ 183</a></strong>
+ Make !clean!time! Errors into warnings (or infos) and make them more
+ descriptive
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/197">Issue
+ 197</a></strong>
+ CSS parser breaks counter()
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/202">Issue
+ 202</a></strong>
+ CSS resource fetch failed followed by another error
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/203">Issue
+ 203</a></strong>
+ Chunked encoding + Content-Length = broken
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/206">Issue
+ 206</a></strong>
+ Retain case of all tag and attribute names by default.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/219">Issue
+ 219</a></strong>
+ HandleResponse called on URL which is already erased
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/221">Issue
+ 221</a></strong>
+ Bad hostname when mod_proxy is used to make Apache a reverse proxy
+ </li>
+</ul>
+
+<h2 id="release_0.9.15.3">Release 0.9.15.3</h2>
+<p>
+This release was made Jan 28, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/124">Issue
+ 124</a></strong>
+ Error log noise with relative img links.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/161">Issue
+ 161</a></strong>
+ Add directive to disable combining CSS files across paths.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/170">Issue
+ 170</a></strong>
+ Should not rewrite 404 error pages.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/176">Issue
+ 176</a></strong>
+ Increase the URL segment limitation to 1k characters, but allow a user-level
+ override to tighten it.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/179">Issue
+ 179</a></strong>
+ Caching headers are not set correctly on some sites.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/192">Issue
+ 192</a></strong>
+ Fix problems with trailing junk & queries after resource URLs.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/193">Issue
+ 193</a></strong>
+ /mod_pagespeed_beacon returning a 404.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/196">Issue
+ 196</a></strong>
+ Don't inline css with <code>@import</code> statements, until we add code to
+ absolutify them.
+ </li>
+</ul>
+
+<h2 id="release_0.9.14.6">Release 0.9.14.6</h2>
+<p>
+This release was made Jan 7, 2011. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/53">Issue
+ 53</a></strong>
+ Firebug errors (404s) when mousing over images rewritten with PageSpeed
+ enabled.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/63">Issue
+ 63</a></strong>
+ Breaks Gallery2 installation (issues with mod_rewrite)
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/125">Issue
+ 125</a></strong>
+ Inline JavaScript breaks XHTML strict validation
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/126">Issue
+ 126</a></strong>
+ font: menu not rewritten correctly
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/134">Issue
+ 134</a></strong>
+ Reached end of document without finding body is an error, should be a
+ warning or less
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/144">Issue
+ 144</a></strong>
+ Have HTML rewriting respect ModPagespeedDisallow
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/145">Issue
+ 145</a></strong>
+ Allow ModPagespeed=on when "ModPagespeed off"
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/146">Issue
+ 146</a></strong>
+ Add New Directive "ModPagespeedStatistics off"
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/149">Issue
+ 149</a></strong>
+ Filters need to check that they do not make URLs that are too long
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/154">Issue
+ 154</a></strong>
+ PageSpeed breaks forms in IE 8 with compatibility mode
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/157">Issue
+ 157</a></strong>
+ PageSpeed's caching headers break image caching on IE8
+ </li>
+</ul>
+
+<h2 id="release_0.9.11.5">Release 0.9.11.5</h2>
+<p>
+This release was made Dec 7, 2010. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/131">Issue
+ 131</a></strong>
+ Invalid command 'ModPagespeedImgMaxRewritesAtOnce'
+ </li>
+</ul>
+
+<h2 id="release_0.9.11.3">Release 0.9.11.3</h2>
+<p>
+This release was made Dec 3, 2010. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/4">Issue
+ 4</a></strong>
+ PageSpeed does not handle application/xhtml+xml
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/34">Issue
+ 34</a></strong>
+ when the server provides an Expires header, our cache extension may not work
+ everywhere
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/38">Issue
+ 38</a></strong>
+ js_tinyMCE breaks when it's name is changed
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/56">Issue
+ 56</a></strong>
+ Feature: Moving images to another host name
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/61">Issue
+ 61</a></strong>
+ Shorten hash
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/76">Issue
+ 76</a></strong>
+ Allow explicit control over CSS concat etc
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/81">Issue
+ 81</a></strong>
+ URLs with UTF-8 characters in them cannot be rewritten.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/90">Issue
+ 90</a></strong>
+ Support origin mapping
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/99">Issue
+ 99</a></strong>
+ Strange Last-Modified Header Response
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/107">Issue
+ 107</a></strong>
+ Rewriting images fails to load original image from alternative port
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/112">Issue
+ 112</a></strong>
+ Support if-modified-since
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/113">Issue
+ 113</a></strong>
+ Logfile error for CSS files
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/114">Issue
+ 114</a></strong>
+ query-params in origin URL should have escaped in rewritten URL
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/115">Issue
+ 115</a></strong>
+ Modpagespeed error when access wikimedia
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/117">Issue
+ 117</a></strong>
+ Apache servers behind a load balancer on virtual IP cannot find input
+ resources
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/118">Issue
+ 118</a></strong>
+ PageSpeed doesn't support Application/ce-html+xml MIME type
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/121">Issue
+ 121</a></strong>
+ CSS minification failes when font: shorthand
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/128">Issue
+ 128</a></strong>
+ list-style-type: none rejected by CSS parser.
+ </li>
+</ul>
+
+<h2 id="release_0.9.8.1-250">Release 0.9.8.1-250</h2>
+<p>
+This release was made Nov 23, 2010. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/6">Issue
+ 6</a></strong>
+ Page speed running on debian with mpm-worker + fcgi causes lots of errors
+ written to apache log
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/24">Issue
+ 24</a></strong>
+ Compile failure under g++ 4.5 on opensuse 11.3
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/34">Issue
+ 34</a></strong>
+ when the server provides an Expires header, our cache extension may not work
+ everywhere
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/35">Issue
+ 35</a></strong>
+ should not add 'public' to Cache-Control
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/43">Issue
+ 43</a></strong>
+ Some png images not loading
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/46">Issue
+ 46</a></strong>
+ url causes Apache to become unresponsive due to high load.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/52">Issue
+ 52</a></strong>
+ Docs incorrectly state that PageSpeed generates uncompressed HTML
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/60">Issue
+ 60</a></strong>
+ combine_css breaks background image url due to mis-handling of quotes.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/62">Issue
+ 62</a></strong>
+ Apache children segfaulting using Event MPM
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/69">Issue
+ 69</a></strong>
+ Compile error Debian Etch / gcc-42
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/79">Issue
+ 79</a></strong>
+ Memory corruption
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/82">Issue
+ 82</a></strong>
+ Poll success status 0 (111) in image-rich site
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/84">Issue
+ 84</a></strong>
+ mod-pagespeed-beta-0.9.0.0-128 incompatible with Trac 0.12
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/85">Issue
+ 85</a></strong>
+ Infinite recursion of PageSpeed requesting its own pages
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/89">Issue
+ 89</a></strong>
+ source does not exist in sh
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/91">Issue
+ 91</a></strong>
+ Broken link on overview.html
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/94">Issue
+ 94</a></strong>
+ base URL not respected for image rewriting
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/95">Issue
+ 95</a></strong>
+ Mysterious 404s reported in access.log from Serf of the right file at the
+ wrong path.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/98">Issue
+ 98</a></strong>
+ CHECK failure on malformed html comment syntax
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/99">Issue
+ 99</a></strong>
+ Strange Last-Modified Header Response
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/100">Issue
+ 100</a></strong>
+ extend_cache breaks WHMCS site..
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/102">Issue
+ 102</a></strong>
+ doc that elide_attributes_filter has specific risks
+ </li>
+</ul>
+
+<h2 id="release_0.9.8.1-215">Release 0.9.8.1-215</h2>
+<p>
+This release was made Nov 16, 2010. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/3">Issue
+ 3</a></strong>
+ CSS Not Loading
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/7">Issue
+ 7</a></strong>
+ insert_img_dimensions not detecting existing dimensions
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/9">Issue
+ 9</a></strong>
+ rfc - generated cache names are too long
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/14">Issue
+ 14</a></strong>
+ Invalid url relative to '...'
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/21">Issue
+ 21</a></strong>
+ transparency of inlined PNG image
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/25">Issue
+ 25</a></strong>
+ Internal Server Error - Not actually an error
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/26">Issue
+ 26</a></strong>
+ PNG being scanned as HTML
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/27">Issue
+ 27</a></strong>
+ Internal Server Error for 304 - not actually an error
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/33">Issue
+ 33</a></strong>
+ Do not warn on "Invalid url relative to..."
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/36">Issue
+ 36</a></strong>
+ Data URLs, such as those created by image inlining, clutter the log
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/37">Issue
+ 37</a></strong>
+ javascript with name rewriten not found
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/38">Issue
+ 38</a></strong>
+ javascripts doesn't work with rewrite_javascript enabled
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/44">Issue
+ 44</a></strong>
+ Do not warn on 'Failed to create or read input resource'
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/50">Issue
+ 50</a></strong>
+ rewrite_css filter incompatible with CSS3 media queries
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/51">Issue
+ 51</a></strong>
+ rewrite_css removes rgba color values
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/64">Issue
+ 64</a></strong>
+ Remove 'Failed to load resource' message from rewrite_css filter.
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/66">Issue
+ 66</a></strong>
+ rewrite_css removes transform values
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/73">Issue
+ 73</a></strong>
+ false warning: end of document without finding body
+ </li>
+</ul>
+
+<h2 id="release_0.9.1.1-171">Release 0.9.1.1-171</h2>
+<p>
+This release was made Nov 8, 2010. It fixes the following issues:
+</p>
+<ul>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/5">Issue
+ 5</a></strong>
+ Incorrectly handling not-quoted font-family names with spaces
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/7">Issue
+ 7</a></strong>
+ insert_img_dimensions not detecting existing dimensions
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/10">Issue
+ 10</a></strong>
+ A whole lot of HTTPD processes
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/11">Issue
+ 11</a></strong>
+ After installing module server becomes unusable
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/18">Issue
+ 18</a></strong>
+ LogLevel seems to be ignored
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/25">Issue
+ 25</a></strong>
+ Misleading server error message
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/30">Issue
+ 30</a></strong>
+ Very slow memory leak
+ </li>
+ <li><strong><a
+ href="http://github.com/apache/incubator-pagespeed-mod/issues/33">Issue
+ 33</a></strong>
+ Do not warn on "Invalid url relative to..."
+ </li>
+</ul>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/restricting_urls.html b/doc/restricting_urls.html
new file mode 100644
index 0000000..1df0117
--- /dev/null
+++ b/doc/restricting_urls.html
@@ -0,0 +1,300 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed URL Control</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed URL Control</h1>
+<h2 id="disallow">Restricting Rewriting Via Wildcards: Allow and Disallow</h2>
+
+<p>By default, all HTML files served by your server and all resources (CSS,
+images, JavaScript) found in HTML files whose origin matches the HTML file, or
+whose origin is authorized via <a href="domains#auth_domains">Domain</a>, will
+be rewritten. However, this can be restricted by using wildcards, using the
+directives:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedAllow wildcard_spec
+ModPagespeedDisallow wildcard_spec</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed Allow wildcard_spec;
+pagespeed Disallow wildcard_spec;</pre>
+</dl>
+
+<p>These directives are evaluated in sequence for each resource, to determine
+whether the resource should be consider for rewriting. This is best
+considered with an example.</p>
+
+<h3>Example 1: Excluding JavaScript files that cannot be rewritten</h3>
+
+<p>Some JavaScript files are sensitive to their own names as they
+traverse the DOM. Therefore any rewriting on these files is invalid.
+We cannot cache-extend them or minifiy them. When such files are
+identified, we can exclude from the rewriting process via:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDisallow "*/jquery-ui-1.8.2.custom.min.js"
+ModPagespeedDisallow "*/js_tinyMCE.js"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed Disallow "*/jquery-ui-1.8.2.custom.min.js";
+pagespeed Disallow "*/js_tinyMCE.js";</pre>
+</dl>
+
+<h3>Example2: Specifying explicitly which types of files can be rewritten</h3>
+
+<p>By default, every resource referenced by HTML from authorized domains is
+rewritten, as if there was an implicit</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedAllow "*"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed Allow "*";</pre>
+</dl>
+
+<p>at the beginning of every configuration. To change the default to
+be exclusive, issue</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDisallow "*"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed Disallow "*";</pre>
+</dl>
+
+<p>and then follow it with which files you want to include. For example:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedDisallow "*"
+ModPagespeedAllow "http://*example.com/*.html"
+ModPagespeedAllow "http://*example.com/*/images/*.png"
+ModPagespeedAllow "http://*example.com/*/styles/*.css"
+ModPagespeedDisallow "*/images/captcha/*"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed Disallow "*";
+pagespeed Allow "http://*example.com/*.html";
+pagespeed Allow "http://*example.com/*/images/*.png";
+pagespeed Allow "http://*example.com/*/styles/*.css";
+pagespeed Disallow "*/images/captcha/*";</pre>
+</dl>
+
+<p>The <em>later</em> directives take priority over the earlier ones, so
+the Captcha images will not be rewritten.</p>
+
+<p class="note">
+<strong>Note:</strong> Wildcards include <code>*</code> which matches
+any 0 or more characters, and <code>?</code>, which matches exactly
+one character. Unlike Unix shells, the <code>/</code> directory
+separator is not special, and can be matched by either <code>*</code>
+or <code>?</code>. The resources are always expanded into their absolute
+form before expanding.
+</p>
+
+<p class="note">
+<strong>Note:</strong> The wildcard will be matched against the full URL
+including any query parameters. For example, if you want to match URL
+<code>http://example.com/index.jsp?test=xyz</code> you could use</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedAllow "*.jsp*"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed Allow "*.jsp*";</pre>
+</dl>
+
+<p>If you were to omit the trailing <code>*</code>, then URLs with query-params
+would not match.</p>
+
+<p>
+These directives can be used
+in <a href="configuration#htaccess">location-specific configuration
+sections</a>.
+</p>
+
+<p class="note">
+<strong>Note:</strong> The names in wildcards are <strong>not</strong> evaluated
+with respect to the <a href="configuration#htaccess">location specific
+configuration</a>; the wildcards are evaluated against the fully expanded URL.
+So if you want to match <code>js_tinyMCE.js</code> you must prefix it with its
+full path, including <code>http://</code> and domain, or use a wildcard, as
+shown above.
+</p>
+
+<h2 id="cross_paths">Restricting PageSpeed from combining resources across
+paths</h2>
+<p>By default, filters that combine multiple resources together are allowed to
+combine multiple resources across paths. This works well much of the time, but
+if there are <a href="configuration#htaccess">location-specific access
+controls</a> or path-specific cookies associated with JavaScript files, then you
+may need to turn off this feature.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedCombineAcrossPaths off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed CombineAcrossPaths off;</pre>
+</dl>
+
+<p>
+This directive can be used in
+<a href="configuration#htaccess">location-specific configuration sections</a>.
+</p>
+
+<h2 id="aris">Restricting PageSpeed from rewriting URLs of introspective
+JavaScript</h2>
+
+<p>
+Filters that change URLs of JavaScript files are at times incompatible with
+JavaScript code that does string-manipulation on its own URL. To avoid problems
+with introspective JavaScript files, PageSpeed can be configured to skip
+URL-rewriting for such files. PageSpeed uses simple heuristics to determine
+whether a JavaScript file is introspective.
+</p>
+
+<p>
+This affects filters
+<a href="filter-js-minify"
+ ><code>rewrite_javascript</code></a>,
+<a href="filter-js-combine"
+ ><code>combine_javascript</code></a>,
+<a href="filter-js-inline"
+ ><code>inline_javascript</code></a>,
+<a href="filter-cache-extend"
+ ><code>extend_cache</code></a>, and
+<a href="filter-cache-extend"
+ ><code>extend_cache_scripts</code></a>.
+</p>
+
+<p>
+This feature is on by default, but for many sites these heuristics are too
+conservative and prevent optimizations that would actually be safe. To turn
+it off:
+</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedAvoidRenamingIntrospectiveJavascript off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed AvoidRenamingIntrospectiveJavascript off;</pre>
+</dl>
+
+<p>
+This directive can be used in
+<a href="configuration#htaccess">location-specific configuration sections</a>.
+</p>
+
+<h2 id="segment_length"
+ >Limiting the maximum generated URL segment length</h2>
+
+<p>The maximum URL size is generally limited to about 2k characters
+due to Internet Explorer: See
+<a href="http://support.microsoft.com/kb/208427/EN-US">
+ http://support.microsoft.com/kb/208427/EN-US</a>.
+Nginx doesn't apepar to have a limit here but Apache servers by default impose a
+further limitation of about 250 characters per URL segment (text between
+slashes). When running under Apache PageSpeed circumvents this limitation, but
+if you employ proxy servers in your path you may need to re-impose it by
+overriding the setting here. The default setting is 1024.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxSegmentLength 250</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxSegmentLength 250;</pre>
+</dl>
+
+<p>
+This directive can be used in
+<a href="configuration#htaccess">location-specific configuration sections</a>.
+</p>
+
+<h2 id="content_length"
+ >Limiting the maximum size of a resource to optimize</h2>
+
+<p>A resource with large content takes a long time and a large amount of memory
+to process. You can specify the maximum length (in bytes) of the content for
+PageSpeed to optimize. A setting of -1 means content of all lengths will be
+optimized, but risks server out-of-memory crashes.</p>
+
+<p>Prior to 1.12.34.1 the default was -1 (unlimited), but in versions
+1.12.34.1 and later the default is 16MB.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMaxCacheableContentLength 16777216</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MaxCacheableContentLength 16777216;</pre>
+</dl>
+
+<p>
+This directive can be used in
+<code><VirtualHost></code> scope (Apache) or <code>server</code> blocks
+(Nginx).
+</p>
+
+<h2 id="url_signatures">Signing pagespeed resource URLs</h2>
+
+<p class="note"><strong>Note: New feature as of 1.9.32.1</strong></p>
+
+<p>PageSpeed can be set to automatically cryptographically sign and verify
+resource URLs. Turning on resource signing will cause any resource requested
+without the proper signature to return <code>404 Not Found</code>
+or <code>403 Forbidden</code> depending upon the <code>InPlaceResourceOptimization</code> setting.
+This option can be used to reduce the attack surface for denial of service attacks.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedUrlSigningKey signature_key_string</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed UrlSigningKey signature_key_string;</pre>
+</dl>
+
+<p>Resource signing can also be turned on, but not enforced, which may be
+used for the transition period of moving a site from unsigned resourced to
+signed resources. In this mode, signed URLs are generated and accepted, as
+well as URLs with no signature and URLs with invalid signatures.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedAcceptInvalidSignatures true</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed AcceptInvalidSignatures true;</pre>
+</dl>
+
+<p>
+This directive can be used in
+<code><VirtualHost></code> scope (Apache) or <code>server</code> blocks
+(Nginx).
+</p>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/doc/system.html b/doc/system.html
new file mode 100644
index 0000000..7838215
--- /dev/null
+++ b/doc/system.html
@@ -0,0 +1,1343 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>PageSpeed System Integration</title>
+ <link rel="stylesheet" href="doc.css">
+ </head>
+ <body>
+<!--#include virtual="_header.html" -->
+
+
+ <div id=content>
+<h1>PageSpeed System Integration</h1>
+ <h2 id="caching">Configuring Caching</h2>
+ <p>
+ PageSpeed requires publicly cacheable resources to provide
+ maximum benefit. As discussed in the "Cache Extender" filter, the
+ origin TTL specified in the server configuration file dictates how
+ quickly changes made to the source can propagate to users' browser
+ caches. However, using PageSpeed, resources referenced statically
+ from HTML files will be served with a one-year cache lifetime, but
+ with a URL that is versioned using a content hash.
+ </p>
+
+ <h2 id="server_cache">Configuring Server-Side Cache for PageSpeed</h2>
+ <p>
+ In order to rewrite resources, PageSpeed must cache them server-side. A
+ file-system based cache is always employed on each
+ server. <a href="#memcached">memcached</a> or <a href="#redis">redis</a>
+ may be used as a scalable network-accessible cache in addition to the file
+ cache. The file cache is always required, since PageSpeed has a few
+ things it needs to store locally. Finally, a per-process in-memory LRU
+ cache and/or an interprocess shared-memory cache can be configured for
+ rapid access to small objects.
+ </p>
+
+ <h3 id="file_cache">Configuring the File Cache</h3>
+ <p>
+ PageSpeed must be configured with a path where it can write
+ cache files, tuned to limit the amount of disk space consumed.
+ The file cache can be placed on
+ a <a href="http://en.wikipedia.org/wiki/Tmpfs">tmpfs</a>
+ partition or on a physical disk. The file cache has a built-in
+ LRU mechanism to remove old files, targeting a certain total
+ disk space usage, and a certain interval for the cleanup
+ process. An example configuration is:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedFileCachePath "/var/cache/pagespeed/"
+ModPagespeedFileCacheSizeKb 102400
+ModPagespeedFileCacheCleanIntervalMs 3600000
+ModPagespeedFileCacheInodeLimit 500000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed FileCachePath "/var/cache/pagespeed/";
+pagespeed FileCacheSizeKb 102400;
+pagespeed FileCacheCleanIntervalMs 3600000;
+pagespeed FileCacheInodeLimit 500000;</pre>
+</dl>
+ <p>
+ It is important to note that <code>FileCacheSizeKb</code> and
+ <code>FileCacheInodeLimit</code> do not define absolute limits
+ on the cache size and inode count. The cache cleaning process will run at
+ the time interval defined by
+ <code>FileCacheCleanIntervalMs</code>, and will only initiate
+ cleaning if the cache size exceeds
+ <code>FileCacheSizeKb</code> or the cache inode count exceeds
+ <code>FileCacheInodeLimit</code>. When cache cleaning is
+ initiated, the oldest files in the cache will be removed until the cache
+ size is under <code>0.75 * FileCacheSizeKb</code> and the
+ inode count is under <code>0.75 * FileCacheInodeLimit</code>.
+ </p>
+ <p class="warning">
+ <b>Warning:</b> Because the file cache cleaner does not impose a tight
+ bound on disk usage, if your site is large and receives heavy traffic
+ PageSpeed's cache can expand to fill your entire disk. If this becomes a
+ problem you must either use a sufficiently large disk that this can't
+ happen, or a cache whose size is guaranteed to be bounded. Bounded caches
+ include keeping your file cache on a PageSpeed-specific
+ partition, <a href="#memcached">memcached</a>,
+ and <a href="#redis">redis</a>.
+ </p>
+ <p>
+ PageSpeed previously reserved another file-path for future use as a shared
+ database in a multi-server environment. This is no longer in the plan,
+ and <code>GeneratedFilePrefix</code> now generates a deprecation warning.
+ </p>
+ <p>
+ Starting in version 1.12.34.1, it is possible to disable cache cleaning
+ entirely, making PageSpeed ignore the limits set
+ by <code>FileCacheSizeKb</code> and <code>FileCacheInodeLimit</code>. To
+ do this, set <code>FileCacheCleanIntervalMs</code> to -1:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedFileCacheCleanIntervalMs -1</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed FileCacheCleanIntervalMs -1;</pre>
+</dl>
+ <p>
+ In versions before 1.12.34.1, using a large number for the interval, like
+ <code>1576800000000</code> (fifty years), has the same effect.
+ </p>
+ <p class="warning">
+ <b>Warning:</b> Without cleaning the cache will grow without bound as
+ PageSpeed continues to store additional resources. If you disable the
+ built-in cache cleaner you must implement something yourself to ensure
+ that PageSpeed does not consume all available disk space for its cache.
+ </p>
+
+ <h3 id="lru_cache">Configuring the in-memory LRU Cache</h3>
+ <p>
+ To optimize performance, a small in-memory write-through LRU cache can be
+ instantiated in each server process. Note that in Apache's pre-fork mode
+ this means dozens of processes, so the total memory consumed
+ (<code>LRUCacheKbPerProcess * num_processes</code>) must fit into the
+ capabilities of the host machine. Nginx typically runs with many fewer
+ processes, so a larger <code>LRUCacheKbPerProcess</code> is appropriate
+ there. The <code>LRUCacheByteLimit</code> is the limit on how large a
+ cache entry the LRU cache will accept. A sample configuration is:
+ </p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedLRUCacheKbPerProcess 1024
+ModPagespeedLRUCacheByteLimit 16384</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed LRUCacheKbPerProcess 8192;
+pagespeed LRUCacheByteLimit 16384;</pre>
+</dl>
+
+ <h3 id="shm_cache">Configuring the Shared Memory Metadata Cache</h3>
+
+ <p>As part of its operation, PageSpeed stores summaries of how to apply
+ optimizations to web pages as part of a <em>metadata cache</em>. Metadata
+ entries are small and frequently accessed. They should ideally be stored in
+ local memory and shared across server processes, as opposed to on disk or
+ an <a href="#external_cache">external cache</a>. That is exactly what the
+ shared memory metadata cache does, and it is the best place to cache your
+ metadata entries.</p>
+
+ <p>Prior to 1.12.34.1, writes to an explicitly configured shared memory
+ metadata cache were in-memory only, and not written to disk. This provided a
+ large performance boost but the contents of the cache were lost upon server
+ restart.</p>
+
+ <p>As of 1.12.34.1, PageSpeed checkpoints the shared memory metadata cache
+ to disk, providing almost all the performance but without the cache being
+ wiped on restart. By default the metadata cache is checkpointed every 5
+ minutes, see <a href="#shm_checkpointing">shared memory checkpointing</a>
+ for more details.</p>
+
+ <p>In all versions, if you enable an <a href="#external_cache">external
+ cache</a>, cache entries are written through to it.</p>
+
+ <p>The shared memory metadata cache is enabled using
+ the <code>CreateSharedMemoryMetadataCache</code> directive. This directive
+ takes two arguments. The first is the exact string given as the argument
+ to <code>FileCachePath</code> in any virtual host where you want this cache
+ active. The second is the size of the cache in kilobytes. Unlike the LRU
+ cache, this cache is shared among all server processes, so far larger values
+ are possible. For example:
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedCreateSharedMemoryMetadataCache "/var/cache/pagespeed/" 51200
+<VirtualHost www.example.com:80>
+ ModPagespeedFileCachePath "/var/cache/pagespeed/"
+</VirtualHost>
+<VirtualHost alt.example.com:80>
+ ModPagespeedFileCachePath "/var/cache/pagespeed/"
+</VirtualHost></pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed CreateSharedMemoryMetadataCache "/var/cache/pagespeed/" 51200;
+server {
+ listen 80;
+ server_name www.example.com;
+ pagespeed FileCachePath "/var/cache/pagespeed/";
+}
+server {
+ listen 80;
+ server_name alt.example.com;
+ pagespeed FileCachePath "/var/cache/pagespeed/";
+}</pre>
+</dl>
+
+ will create a 50-megabyte metadata cache used for both www.example.com and
+ alt.example.com, and shared among all server processes.
+
+ <p>If you are currently using a file cache, you can estimate a good size for
+ this cache by measuring the size of the <code>rname/</code> directory of
+ the on-disk cache, using the <code>du -s -h --apparent-size</code> command,
+ for example:
+<pre class="prettyprint-sh">
+du -s -h --apparent-size /path/to/pagespeed_cache/rname
+</pre>
+
+ then, multiplying the result by 1.75 and converting it to kilobytes.</p>
+
+ <p> You can see how effective this layer of cache is at the
+ <a href="configuration#virtual-hosts-and-stats">global PageSpeed
+ statistics</a> page, where at the bottom of the page every shared
+ memory cache will be listed, including in particular information on its hit
+ rate and how full it is (blocks used). </p>
+
+ <h3 id="default_shm_cache">Default Shared Memory Metadata Cache</h3>
+ <p>
+ Any virtual host that does not have a <a href="#shm_cache">shared memory
+ metadata cache</a> configured
+ with <code>CreateSharedMemoryMetadataCache</code> will share a default
+ one. In versions 1.12.34.1 and later, snapshots of the shared memory
+ cache are periodically saved to disk via <a href="#shm_checkpointing"
+ >shared memory checkpointing</a>. Versions prior to 1.12.34.1 did not
+ support snapshotting, and instead wrote all changes through to disk,
+ significantly degrading the write performance of the shared memory cache.
+ </p>
+ <p>
+ You can configure the size of this cache
+ with <code>DefaultSharedMemoryCacheKB</code>, or disable it entirely by
+ setting the size to 0. The default size is 50MB, and is shared across all
+ server processes.
+ </p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedDefaultSharedMemoryCacheKB 50000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed DefaultSharedMemoryCacheKB 50000;</pre>
+</dl>
+
+ <p>
+ This directive can only be used at the top level of your configuration.
+ </p>
+
+ <h3 id="shm_checkpointing">Shared Memory Metadata Cache Checkpointing</h3>
+ <p class="note"><strong>Note: New feature as of 1.12.34.1</strong></p>
+ <p>
+ Shared memory caches are fast but have the significant disadvantage that
+ they do not survive a server restart. The file cache does persist across
+ restarts but performs significantly worse than an in-memory cache.
+ Checkpointing attempts to provide a balance by using the same fast
+ in-memory cache and periodically writing its contents to disk. In practice
+ this can perform almost as well as a straight memory cache, with the
+ significant advantage that it also survives a server restart, as the
+ checkpoint is read into memory at startup.
+ </p>
+ <p>
+ If you're using an <a href="#external_cache">external cache</a>, all
+ writes to the shared memory metadata cache are written out to the external
+ cache so that other servers using the same external cache can avoid
+ redundant optimization. In this configuration, the checkpoint is not
+ written through to the external cache when it is restored, because this
+ could overwrite the work of other servers.
+ </p>
+ <p>
+ Checkpointing is enabled by default, running every five minutes. You can
+ adjust this interval by
+ setting <code>ShmMetadataCacheCheckpointIntervalSec</code>, and you can
+ disable checkpointing entirely by setting it to -1.
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedShmMetadataCacheCheckpointIntervalSec 300</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ShmMetadataCacheCheckpointIntervalSec 300;</pre>
+</dl>
+ <p>
+ This directive can only be used at the top level of your configuration.
+ </p>
+ <p>
+ Note that if you disable checkpointing, the shared memory cache will not
+ be written to disk, and all optimizations will be lost on server restart.
+ </p>
+ <p>
+ If you have multiple file caches enabled, PageSpeed has to pick one to
+ use for snapshots for the default shared memory cache. It resolves this
+ by taking the file cache path that comes first alphabetically and putting
+ all snapshots there.
+ </p>
+
+ <h3 id="external_cache">External Caches</h3>
+
+ <p>
+ PageSpeed supports two different external
+ caches, <a href="#memcached">memcached</a> and <a href="#redis">redis</a>.
+ The main reasons to use an external cache are:
+ </p>
+ <ul>
+ <li>You want to run multiple PageSpeed servers without
+ duplicating optimizations.
+ <li>You want to allocate more memory to PageSpeed's cache than a single
+ machine an provide.
+ </ul>
+ <p>
+ You can configure different external caches for different virtual hosts,
+ but you can't use both memcached and redis for the same virtual host.
+ </p>
+
+
+ <h4 id="memcached">Configuring memcached</h3>
+ <p>
+ To enable <a href="http://memcached.org/">memcached</a>, specify the list
+ of memcached servers with a comma-separated list of hosts and ports. If
+ the port is omitted, the default memcached port of 11211 is assumed.
+ PageSpeed's memcached integration by uses a background thread for
+ communicating with the memcached servers. This allows PageSpeed to batch
+ multiple Get requests into a single MultiGet request to memcached, which
+ improves performance and reduces network round trips.
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMemcachedServers "host1:port1,host2:port2,host3:port3"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MemcachedServers "host1:port1,host2:port2,host3:port3";</pre>
+</dl>
+ <p class="note">
+ To start memcached with 1Gb of memory, use <code>memcached -p PORT -m 1024
+ -u WEBSERVER_USERNAME</code>. The default size of 64Mb might be too low
+ for large sites. See <a
+ href="https://github.com/memcached/memcached/wiki/ConfiguringServer">the
+ wiki</a> for detailed memcached configuration help. Be aware that
+ configuring scalable caching requires tuning and iteration. You must be
+ sure that the user-id running the server has permission to access
+ memcached. For example, on CentOS, you may need to run memcached
+ with:
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >memcached -p PORT -m MEMORY_IN_MEGABYTES -u apache</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >memcached -p PORT -m MEMORY_IN_MEGABYTES -u nginx</pre>
+ </dl>
+ If SELinux is enabled, then you must also grant permission for the
+ server to access the memcached port. Failure to do this results in
+ 'permission denied' warnings in the error logs and will prevent
+ PageSpeed from optimizing resources.
+ </p>
+
+ <p>
+ When you use memcached with PageSpeed, many vital memcached statistics can
+ be found
+ at
+ <dl>
+ <dt>Apache:<dd><pre
+ >http://localhost/mod_pagespeed_statistics?memcached</pre>
+ <dt>Nginx:<dd><pre
+ >http://localhost/ngx_pagespeed_statistics?memcached</pre>
+ </dl>
+ These statistics are taken both from the PageSpeed perspective,
+ aggregating all memcacheds as viewed from a single server...
+ </p>
+<pre class="prettyprint">
+memcached_deletes: 0
+memcached_hits: 81651
+memcached_inserts: 161605
+memcached_misses: 118782
+</pre>
+ <p>
+ ...and also from the perspective of each memcached server, aggregating
+ activity from each memcached client including all PageSpeed instances.
+ </p>
+ <pre class="prettyprint">
+memcached server host1:6765 version 1.4.2 pid 1132 up 343306 seconds
+bytes: 923977753
+bytes_read: 37710601552
+bytes_written: 141519206300
+cmd_get: 50273185
+cmd_set: 11471631
+connection_structures: 233
+curr_connections: 16
+curr_items: 255329
+evictions: 5258751
+get_hits: 50273185
+get_misses: 14556369
+limit_maxbytes: 1048576000
+pointer_size: 64
+rusage_system: 1065290000
+rusage_user: 64
+threads: 4
+total_connections: 12235148
+total_items: 11471631
+
+memcached server host2:6765 version 1.4.2 pid 6568 up 343278 seconds
+bytes: 921246303
+bytes_read: 12962377990
+bytes_written: 57778312362
+cmd_get: 21702123
+cmd_set: 4166384
+connection_structures: 49
+curr_connections: 15
+curr_items: 254144
+evictions: 1329595
+get_hits: 21702123
+get_misses: 4923668
+limit_maxbytes: 1048576000
+pointer_size: 64
+rusage_system: 594360000
+rusage_user: 64
+threads: 4
+total_connections: 4840010
+total_items: 4166384
+</pre>
+
+ <p>
+ By default, PageSpeed uses a half-second (500,000 microsecond) timeout for
+ cache operations. If the timeout is exceeded more than 4 times in a 30
+ second span, PageSpeed assumes that memcached is not healthy and will stop
+ optimizing resources for 30 seconds before trying again.
+ </p>
+
+ <p>
+ For wide area networks or for alternative implementations and proxies of
+ the memcache protocol such as couchbase or moxi-server it may be necessary
+ to increase the I/O timeout. Please monitor the statistic
+ 'memcache_timeouts' to help tune the timeouts. Select a new timeout with
+ the <code>MemcachedTimeoutUs</code> directive:
+ </p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMemcachedTimeoutUs timeout_in_microseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MemcachedTimeoutUs timeout_in_microseconds;</pre>
+</dl>
+
+ <p>
+ For example, to increase the timeout to from half a second to a second,
+ use:
+ </p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMemcachedTimeoutUs 1000000</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MemcachedTimeoutUs 1000000;</pre>
+</dl>
+
+ <h4 id="redis">Configuring Redis</h4>
+ <p class="note"><strong>Note: New feature as of 1.12.34.1</strong></p>
+ <p class="warning"><strong>Warning:</strong> Redis support is experimental
+ and has not yet had substantial real world use. Before rolling this out
+ in production, be sure to test it well. If you run into problems, please
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/new"
+ >let us know</a>.
+ </p>
+ <p>
+ To enable <a href="http://redis.io/">redis</a>, specify a single redis
+ server as <code>host:port</code>. The port is optional, and defaults to
+ 6379. This host can either be a stand-alone redis server, or a master
+ node from a redis cluster. If the host is a cluster node, PageSpeed will
+ ask it for the cluster configuration and distribute its reads and writes
+ among the cluster nodes.
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRedisServer "host:port"</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RedisServer "host:port";</pre>
+</dl>
+ <p>
+ You can configure how long PageSpeed is willing to wait for a response
+ from Redis before timing out a request, which defaults to 50ms:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRedisTimeoutUs timeout_in_microseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RedisTimeoutUs timeout_in_microseconds;</pre>
+</dl>
+ <p>
+ You can also configure how long PageSpeed will wait after an error from
+ Redis before it tries connecting again, which defaults to 1s:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRedisReconnectionDelayMs timeout_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RedisReconnectionDelayMs timeout_in_milliseconds;</pre>
+</dl>
+ <p>
+ As of 1.13.35.1 you can also select the Redis logical database having the specified
+ numeric index. This setting defaults to database index 0.
+ Note that the Redis clustering feature does not allow specifying a database index,
+ and therefore is incompatible with this setting:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRedisDatabaseIndex index</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RedisDatabaseIndex index;</pre>
+</dl>
+ <p>
+ You can set an expiration time (or TTL) in seconds for the Redis keys.
+ The setting defaults to -1 meaning that the keys will never expire and can be specified like this:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRedisTTLSec ttl_in_seconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RedisTTLSec ttl_in_seconds;</pre>
+</dl>
+
+ <h2 id="flush_cache">Flushing PageSpeed Server-Side Cache</h2>
+ <p>
+ When developing web pages with PageSpeed enabled, it is
+ sometimes convenient to flush the cache of a running server, in
+ order to get the system to reload CSS or JavaScript files that
+ have been updated before the origin cache lifetime expires.
+ </p>
+ <h3 id="flush_cache_legacy">Legacy Flushing Of Entire Cache</h3>
+ <p>
+ By default, the system is configured to support only whole-cache
+ flushes — we'll call this <em>legacy mode</em>. As
+ of <strong>version 1.9.32.1</strong>, it can be configured to
+ also allow purging of individual URLs. The two modes operate
+ differently and you may choose between them for each virtual
+ host. Legacy mode is on by default, to provide compatibility
+ with existing scripts and other infrastructure that might have
+ been built around it. In a future release, individual URL
+ purging will become the default. Subsequent to that, the legacy
+ whole-cache flushing mode will be eliminated.
+
+ You can choose between the two modes with
+ the <code>EnableCachePurge</code> argument. If set to "on" you
+ will get the new behavior, with individual URL purging, while
+ "off" will give you the legacy behavior. The default is "off",
+ as if your configuration read:
+ </p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableCachePurge off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableCachePurge off;</pre>
+</dl>
+ <p>
+ In this mode, simply touch the file "cache.flush" in the directory
+ specified as <code>FileCachePath</code> above. For example:
+ </p>
+<pre class="prettyprint lang-sh">
+ sudo touch /var/cache/pagespeed/cache.flush
+</pre>
+ <p>
+ The system may take up to 5 seconds to take effect (changeable via option
+ <code>CacheFlushPollIntervalSec</code> described
+ <a href="#purge_options">below</a>).
+ </p>
+ <h3 id="purge_cache">Purging individual cache entries or entire cache</h3>
+ <p class="note"><strong>Note: New feature as of 1.9.32.1</strong></p>
+ <p>
+ In this mode, the cache may be purged by sending HTTP requests
+ to the server, using a configurable
+ path. The cache can be purged via
+ an HTTP GET, PURGE, or DELETE, once a handler has been
+ <a href="admin#config">configured</a>. The <a href="admin">admin
+ site</a> makes this easier by providing a graphical interface to
+ initiate purge requests and see what entries have been purged.
+ </p>
+ <p>To enable individual URL cache purging, you must
+ <a href="admin#config">configure the admin site</a>,
+ specify a PurgeMethod, or both. Plus you must turn on
+ EnableCachePurge:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableCachePurge on
+ModPagespeedPurgeMethod PURGE <em>(optional)</em></dd></pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableCachePurge on;
+pagespeed PurgeMethod PURGE; <em>(optional)</em></dd></pre>
+</dl>
+ <p>
+ This establishes three methods to purge the cache of a URL, or to
+ purge the entire cache, assuming PageSpeed is running on example.com:
+ <table>
+ <thead>
+ <tr>
+ <th>Method</th>
+ <th>Purge single URL</th>
+ <th>Purge entire cache</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>HTTP GET</td>
+ <td><code>curl 'http://example.com/pagespeed_admin/cache?purge=path/file.ext'</code></td>
+ <td><code>curl 'http://example.com/pagespeed_admin/cache?purge=*'</code></td>
+ </tr>
+ <tr>
+ <td>HTTP PURGE</td>
+ <td><code>curl --request PURGE 'http://www.example.com/path/file.ext'</code></td>
+ <td><code>curl --request PURGE 'http://www.example.com/*'</code></td>
+ </tr>
+ <tr>
+ <td>Admin GUI</td>
+ <td><img src="images/purge_one_url.png"></td>
+ <td><img src="images/purge_entire_cache.png"></td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+ <p>
+ The Purge requests for individual URLs made via the GUI are
+ executed via an HTTP GET. In either case, the URL being purged
+ is specified relative to the ORIGIN of the admin site. In these
+ examples, <code>path/file.ext</code> is combined
+ with <code>example.com</code> to purge the path
+ <code>http://example.com/path/file.ext</code> from the cache.
+ </p>
+ <p>
+ When the new mode of cache purging is enabled, the purges take
+ place immediately, there is no five second delay. Note that it
+ is possible to purge the entire cache, or to purge one URL at a
+ time. It is not possible to purge by regular expression or
+ wildcard. The URL purging system works by remembering which
+ URLs are purged and validating each URL coming out of cache
+ against them. There is a limitation to the number of distinct
+ URLs that can be purged. When that limit is exceeded,
+ everything in the cache older than the oldest remaining purge
+ request will be dropped. The limitation is high enough that
+ it's not expected to be exceeded often, but is not currently
+ changeable.
+ </p>
+ <h3 id="flush_cache_limitations">Limitations</h3>
+ <p>
+ The following limitations apply to both method the legacy and new methods
+ of cache purging.
+ </p>
+ <p class="caution">
+ <strong>Caution:</strong> In a multi-server system, you must run
+ these commands on every server. All the cache data from
+ VirtualHosts using that cache directory will be flushed. This
+ is true even when using memcached: the cache flush information
+ is kept locally on each machine running PageSpeed, not in the
+ cache itself. This is because of the L1 caches that run locally
+ on each machine, and because memcached does not guarantee
+ persistance.
+ </p>
+ <p class="caution">
+ <strong>Caution:</strong> Flushing or purging the cache does not
+ delete the old files from the directory, the memcached server,
+ or PageSpeed's in-memory cache, but it tells PageSpeed to
+ ignore those files.
+ </p>
+
+ <p class="note">Note: After flushing or purging the cache, the
+ stale files will eventually be replaced with fresh copies or
+ removed by the normal file cache cleaning process
+ (see <code>FileCacheCleanIntervalMs</code> above).
+ </p>
+
+ <p>You can change the polling interval and name of the cache-flush
+ file in the configuration file. If you set the polling interval to 0, the
+ cache flushing feature will be disabled. If you specify the cache flush
+ filename as a relative path, PageSpeed will look for that file in
+ the <code>FileCachePath</code> directory. If you use an absolute path,
+ then the caches associated with multiple virtual hosts can be flushed all
+ at once.
+ </p>
+ <h3 id="purge_options">Cache Flushing and Purging Options</h3>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedCacheFlushFilename alternate_filename
+ModPagespeedCacheFlushPollIntervalSec number_of_seconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed CacheFlushFilename alternate_filename
+pagespeed CacheFlushPollIntervalSec number_of_seconds;</pre>
+</dl>
+
+ <h2 id="downstream_caching">Downstream Caches</h2>
+
+ PageSpeed is designed to work without any caches between it and the user,
+ but it has experimental support for caching proxies. It works with Varnish,
+ Nginx's proxy_cache with the ngx_cache_purge module, and any other server
+ that accepts purge requests over HTTP, allows fragmenting the cache based on
+ UA regexps, and supports modifying caching headers based on the response's
+ content type. For details and sample configurations, please see the
+ documentation on <a href="downstream-caching.html">configuring downstream
+ caches</a>.
+
+
+ <h2 id="shm_lock_manager">Configuring Use of Shared Memory for Locks</h2>
+
+ <p>
+ When fetching or rewriting resources PageSpeed uses locks to ensure that
+ no redundant computation or fetching is done. This can use the file-system
+ or shared memory. The system defaults to shared memory locks, but you can
+ control which implementation is used with
+ the <code>SharedMemoryLocks</code> option, passing it <code>on</code>
+ or <code>off</code>.
+ </p>
+
+ <p>
+ Note that if you turn on shared memory locks when shared memory is not
+ available, the system will fall back to file-system locks automatically.
+ </p>
+
+ <p>
+ On multi-server setups, locking being per-host will not adversely affect
+ correctness but might result in multiple servers performing the
+ same computation simultaneously.
+ </p>
+
+ <p>
+ Virtual hosts that specify <code>SharedMemoryLocks on</code> with
+ identical values of <code>FileCachePath</code> will share the same locking
+ domain. Note that these must be identical strings, not just two strings
+ representing the same directory. For example <code>/var/foo</code>
+ and <code>/var/foo/</code> are different instances from a locking point of
+ view.
+ </p>
+
+ <p>
+ This setting's resource consumption is modest (300 kilobytes per instance
+ on 64-bit systems) and it reduces file-system load.
+ </p>
+
+ <h2 id="cache-fragment">Configuring a Cache Fragment</h2>
+
+ <p>
+ By default every site has its own cache. If you have multiple sites
+ served from the same machine that reference common resources you can
+ improve your cache performance and reduce CPU consumption by setting a
+ shared cache fragment:
+ </p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedCacheFragment some_token</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed CacheFragment some_token;</pre>
+</dl>
+
+ <p>
+ You must set this to the same value on every site that
+ shares a cache. The fragment may consist of letters, numbers, underscores,
+ and hyphens only. The physical caching layer also has to be the same for
+ the two sites: either you need a shared <code>FileCachePath</code> or you
+ need to be using the same <code>memcached</code> server.
+ </p>
+
+ <p>
+ Note: you don't have to do this for simple cases
+ like <code>www.example.com</code> and <code>images.example.com</code>.
+ The default cache fragment is the minimal private suffix, in this
+ case <code>example.com</code>, and is determined from
+ the <a href="http://publicsuffix.org/">public suffix list</a>. If you
+ have <code>www.example.com</code> and <code>images.example.org</code>,
+ however, then they will not share a common minimal private suffix and you
+ should set the <code>CacheFragment</code> for better performance.
+ </p>
+
+ <h2 id="native-fetcher">Native URL fetcher</h2>
+ <p class="note"><strong>Note: Nginx-only</strong></p>
+
+ <p>
+ Often PageSpeed needs to request URLs referenced from other files in order
+ to optimize them. To do this it uses a fetcher. By default ngx_pagespeed
+ uses the same fetcher mod_pagespeed does,
+ <a href="http://serf.apache.org/">serf</a>, but it also has an
+ experimental fetcher that avoids the need for a separate thread by using
+ native Nginx events. In initial testing this fetcher is about 10% faster. To
+ use it, put in your <code>http</code> block:
+ </p>
+
+ <pre>
+pagespeed UseNativeFetcher on;
+resolver 8.8.8.8;</pre>
+
+ <p>
+ Your DNS resolver doesn't have to
+ be <a href="https://developers.google.com/speed/public-dns/">8.8.8.8</a>;
+ any domain name service your server has access to will work. If you don't
+ specify a DNS resolver, PageSpeed will still work but will be limited to
+ fetching only from IP addresses.
+ </p>
+
+ <h2 id="native-fetcher-keep-alive">Persistent Connections with the Native
+ URL Fetcher</h2>
+ <p class="note"><strong>Note: Nginx-only</strong></p>
+ <p class="note"><strong>Note: New feature as of 1.9.32.1</strong></p>
+
+ <p>
+ As of 1.9.32.1 the Native URL Fetcher
+ supports <a
+ href="http://en.wikipedia.org/wiki/HTTP_persistent_connection">persistent
+ HTTP connections</a>. The fetcher will send the <code>Connection:
+ Keep-Alive</code> header and if the server also sets that header on its
+ response then the connection will be kept open for 60 seconds in case
+ another fetch from the same server is needed. By default a connection will
+ be reused no more than 100 times, but you can use
+ <code>NativeFetcherMaxKeepaliveRequests</code> to change this limit.
+ Keep-Alive support is on by default, and you can disable it by setting the
+ limit to 0:
+ </p>
+ <pre>pagespeed NativeFetcherMaxKeepaliveRequests 0;</pre>
+
+ <h2 id="url_fetcher_timeout">Setting the URL fetcher timeout</h2>
+
+ <p>When PageSpeed attempts to rewrite a resource for the first
+ time, it must fetch it via HTTP. The default timeout for fetches is 5
+ seconds. A directive can be applied to change the timeout</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedFetcherTimeoutMs timeout_value_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed FetcherTimeoutMs timeout_value_in_milliseconds;</pre>
+</dl>
+
+ <h2 id="rewrite_deadline">Setting the rewrite deadline per flush window</h2>
+ <p>When PageSpeed attempts to rewrite an uncached (or expired) resource
+ it will wait for up to 10ms per flush window (by default) for it to finish
+ and return the optimized resource if it's available. If it has not
+ completed within that time the original (unoptimized) resource is returned
+ and the optimizer is moved to the background for future requests. The
+ following directive can be applied to change the deadline. Increasing this
+ value will increase page latency, but might reduce load time (for instance
+ on a bandwidth-constrained link where it's worth waiting for image
+ compression to complete). Note that a value less than zero will
+ cause PageSpeed to wait indefinitely.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRewriteDeadlinePerFlushMs deadline_value_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RewriteDeadlinePerFlushMs deadline_value_in_milliseconds;</pre>
+</dl>
+
+<!--
+ <h2 id="rewrite_cache_min_ttl"
+ >Setting the minimum cache-lifetime for optimizing resources</h2>
+ <p>When PageSpeed fetches a resource via HTTP or HTTPS, it uses
+ the origin cache lifetime, based on the Expires or Cache-Control
+ header, to determine how frequently it should check with the
+ origin for updates. If the time-to-live is very quick, then
+ optimization might be pointless and PageSpeed will skip it. The
+ threshold is zero by default, meaning even 1-second resources will
+ be optimized. To set the threshold, use the configuration file
+ setting:</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedMinResourceCacheTimeToRewriteMs minimum_cache_ttl_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed MinResourceCacheTimeToRewriteMs minimum_cache_ttl_in_in_milliseconds;</pre>
+</dl>
+-->
+
+ <h2 id="implicit_cache_ttl"
+ >Setting the implicit cache-lifetime for resources</h2>
+ <p>When PageSpeed fetches a resource via HTTP or HTTPS, it
+ examines the Expires and Cache-Control headers to determine how
+ frequently it should update its cache. When these headers don't
+ specify a timeout, a default timeout of 5 minutes is used. To
+ override this, specify:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedImplicitCacheTtlMs implicit_cache_ttl_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed ImplicitCacheTtlMs implicit_cache_ttl_in_milliseconds;</pre>
+</dl>
+
+ <h2 id="load_from_file_cache_ttl"
+ >Setting the cache-lifetime for resources loaded from file</h2>
+ <p class="note"><strong>Note: New feature as of 1.9.32.2</strong></p>
+ <p>When PageSpeed <a href="domains#ModPagespeedLoadFromFile">loads a
+ resource from file</a>, the default cache lifetime
+ is set by <code>ImplicitCacheTtlMs</code>, to override this, and set a
+ different cache lifetime for resources loaded from file, specify:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedLoadFromFileCacheTtlMs implicit_cache_ttl_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed LoadFromFileCacheTtlMs implicit_cache_ttl_in_milliseconds;</pre>
+</dl>
+
+ <h2 id="fetch_with_gzip">Fetching Resources using Gzip</h2>
+
+ <p>This option causes PageSpeed to add <code>Accept-Encoding:gzip</code> to
+ requests for resources. If the server responding to the request
+ handles this option (e.g. via mod_deflate), this results in reduced
+ bytes transferred over the network.</p>
+
+ <p>By default, PageSpeed attempts to fetch resources without specifying
+ an<code>Accept-Encoding</code> header. This means the resources will be
+ sent uncompressed. These requests are often within the LAN, so network
+ bandwidth to transfer the resources may not be a consideration.</p>
+
+ <p>If network bandwidth is a consideration, then PageSpeed can be
+ configured to fetch resources using gzip. This will lower the network
+ transfer bandwidth considerably, but may increase the CPU usage depending
+ on server configuration. The primary concern is the time spent by the
+ origin server compressing the resource, rather than the time spent by
+ PageSpeed inflating it.</p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedFetchWithGzip on
+SetOutputFilter DEFLATE</pre>
+ <dt>Nginx:<dd><pre class="prettyprint">
+pagespeed FetchWithGzip on;
+gzip on;
+gzip_vary on;
+# Turn on gzip for all content types that should benefit from it.
+gzip_types application/ecmascript;
+gzip_types application/javascript;
+gzip_types application/json;
+gzip_types application/pdf;
+gzip_types application/postscript;
+gzip_types application/x-javascript;
+gzip_types image/svg+xml;
+gzip_types text/css;
+gzip_types text/csv;
+# "gzip_types text/html" is assumed.
+gzip_types text/javascript;
+gzip_types text/plain;
+gzip_types text/xml;
+
+gzip_http_version 1.0;
+</pre>
+</dl>
+
+ <p>Another option to minimize network bandwidth is to use
+ <a href="domains#ModPagespeedLoadFromFile">LoadFromFile</a>.
+ </p>
+
+ <p>
+ These directives can <strong>not</strong> be used
+ in <a href="configuration#htaccess">location-specific configuration
+ sections</a>.
+ </p>
+
+ <h2 id="tune_thread">Tuning Threading</h2>
+ <p>
+ PageSpeed uses threads so that resource optimization work does not delay
+ request serving. There are two kinds of threads in use: <em>rewrite</em>
+ threads deal with very short-lived bookkeeping tasks that are generally
+ latency-sensitive, while <em>expensive rewrite</em> threads deal with more
+ computationally expensive tasks that are not in latency-sensitive
+ paths. By default, if you use a single-threaded MPM (such
+ as <code>prefork</code>) one thread of each kind will be used per an
+ Apache process. With a threaded MPM (such as <code>worker</code>,
+ and <code>event</code>) up to 4 threads of each kind will be used. You
+ can, however, tune the thread count per process if necessary via
+ the <code>NumRewriteThreads</code>
+ and <code>NumExpensiveRewriteThreads</code> options.
+ </p>
+ <p>
+ Note that this is a global setting, and cannot be done in a per virtual
+ host manner.
+ </p>
+
+ <h2 id="image_rewrite_max">Limiting the number of concurrent image
+ optimizations</h2>
+ <p>
+ When optimizing images, PageSpeed can use significant CPU resources. As
+ the results of the image optimization are cached, this is not ordinarily a
+ concern once the cache is warm. But when PageSpeed is first installed, or
+ when a corpus of new images is added to the server, PageSpeed needs to
+ avoid having each process consume maximum CPU. To accomplish this,
+ PageSpeed keeps a server-wide counter of active image optimizations. It
+ avoids running more than <code>ImageMaxRewritesAtOnce</code> image
+ optimizations in parallel across all processes. The default value is 8.
+ Override this in the configuration file to change this maximum.
+ </p>
+ <p>
+ This directive can <strong>not</strong> be used
+ in <a href="configuration#htaccess">location-specific configuration
+ sections</a>.
+ </p>
+
+ <h2 id="max_parse_bytes">Limiting the size of HTML parsed</h2>
+ <p>
+ When parsing and rewriting large HTML pages, PageSpeed can use
+ significant memory. This option limits the size of an HTML page that is
+ parsed. Once the size of the HTML exceeds <code>MaxHtmlParseBytes</code>,
+ further parsing is disabled, and a script is inserted that redirects the
+ user to the <code>?ModPagespeed=off</code> version of the page. The
+ default value is 0, indicating that there is no limit. Override this in
+ the configuration file to change this maximum.
+ </p>
+
+ <h2 id="ipro">In-Place Resource Optimization</h2>
+ <p class="note"><strong>Note: Enabled by default as of 1.9.32.1</strong>
+ </p>
+ <p>Normally PageSpeed rewrites a resource such as an image by finding
+ its URL on your page, fetching and optimizing the data in the background,
+ and then replacing that URL by an optimized pagespeed URL. But what about
+ resources that are loaded by JavaScript code? And what about links to your
+ images from pages outside your domain? In-Place Resource Optimization (IPRO)
+ will optimize the content of a resource that's requested using the original
+ (non-pagespeed) URL, ensuring you are serving optimized content even when
+ that content isn't explicitly linked in your html. This should be especially
+ helpful for sites with slide shows that use JavaScript to load images in the
+ background; those images can now be optimized by PageSpeed by adding
+ this command to your configuration file:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedInPlaceResourceOptimization on</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed InPlaceResourceOptimization on;</pre>
+</dl>
+ <p>
+ Some sites employ JavaScript that is sensitive to the original resource URL
+ syntax and won't work with PageSpeed's altered resource URLs. You can
+ choose to
+ <a href="config_filters#preserveurls">preserve the URLs</a> of your
+ resources; these will still be rewritten by IPRO, but they won't be replaced
+ by a pagespeed URL. This is especially useful as an "optimization is on
+ by default" setting for hosting providers and optimizing forward
+ proxies — cases where site-specific settings to blacklist URLs are
+ impractical.
+ </p>
+ <h3 id="s-maxage">Setting s-maxage on unoptimized resources</h3>
+ <p class="note"><strong>Note: New feature as of 1.12.34.1</strong>
+ </p>
+ <p>
+ When there is a caching proxy between PageSpeed and the user, resources
+ that haven't been optimized yet shouldn't be stored in the proxy cache for
+ the full cache lifetime because this will prevent PageSpeed from
+ optimizing them. As of 1.12.34.1, PageSpeed marks unoptimized resources
+ with <span style="white-space:nowrap"><code>Cache-Control:
+ s-maxage=10</code></span>, telling shared caches that they should only
+ hold the unoptimized resource for ten seconds. Browsers will ignore
+ the <code>s-maxage</code> and will hold the resource for whatever cache
+ lifetime you had originally set.
+ </p>
+ <p>
+ The <code>s-maxage</code> value is configurable:
+ <dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedInPlaceSMaxAgeSec 10</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed InPlaceSMaxAgeSec 10;</pre>
+ </dl>
+ To restore the earlier behavior and not insert <code>s-maxage</code>, set
+ <code>InPlaceSMaxAgeSec</code> to -1.
+ </p>
+ <h3 id="in_place_optimize_for_browser">Doing browser-specific in-place optimization</h3>
+ <p>PageSpeed has a number of optimizations that are browser-specific. For
+ example, <a href="reference-image-optimize#convert_jpeg_to_webp">WebP
+ conversion</a> is performed only for browsers that can display WebP images.
+ Ordinarily PageSpeed accomplishes this by serving different rewritten URLs
+ to different browsers depending upon their capabilities. For resources that
+ are rewritten in place, this isn't possible; instead, appropriate headers
+ (such as Vary: Accept and Vary: User-Agent) are added to rewritten resources
+ as necessary. Enable these browser-specific optimizations as follows:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedEnableFilters in_place_optimize_for_browser</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed EnableFilters in_place_optimize_for_browser;</pre>
+</dl>
+ <p>By default, when <code>in_place_optimize_for_browser</code> is enabled,
+ appropriate <code>Vary:</code> headers are added to resources that are
+ subject to browser-specific optimization. CSS files are served with
+ a <code>Vary: User-Agent</code> header. Photographic images that are
+ candidates for WebP conversion are served with <code>Vary: Accept</code> to
+ browsers that include <code>Accept: image/webp</code> in their headers.
+ Note that while the most recent versions of browsers that display WebP
+ images include this header in image requests, older WebP-capable browsers do
+ not — as a result, a slightly smaller subset of browsers will receive
+ WebP images than would be the case if the URLs were rewritten.</p>
+
+ <p>Internet Explorer has difficulty caching resources
+ with <code>Vary:</code> headers (they are either not cached or require
+ revalidation on every resource access). As a result, browser-specific
+ in-place resources are instead marked <code>Cache-Control: private</code>
+ when served to all versions of Internet Explorer.</p>
+
+ <p class="caution">
+ <strong>Caution for users of downstream caches such as
+ Varnish:</strong> Consult the <a href="downstream-caching">documentation on
+ configuring downstream caches</a> to correctly fragment cache keys based on
+ user agent characteristics; this fragmentation should work equally well
+ for <code>in_place_optimize_for_browser</code>. The <code>Cache-Control:
+ private</code> header sent to Internet Explorer will cause cache entries to
+ be flushed unconditionally. This behavior should be disabled as
+ follows:</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedPrivateNotVaryForIE off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed PrivateNotVaryForIE off;</pre>
+</dl>
+
+ <h3 id="ipro_deadline">Setting the inplace resource rewrite deadline</h2>
+ <p>When InPlaceResourceOptimization is enabled, PageSpeed uses a
+ default deadline of 10ms the when optimizing the resource. If the
+ optimization cannot be completed in 10ms, then the original
+ resource is served to the client, while the optimization continues
+ in the background. Once cached, the optimized resource will be
+ served for further requests. Note that a value less than
+ zero will cause PageSpeed to wait indefinitely.</p>
+ <p>Also note that in-place-optimized resources generally take at
+ least two refreshes to optimize regardless of the deadline, due to
+ the current architecture of the server modules.</p>
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedInPlaceRewriteDeadlineMs deadline_value_in_milliseconds</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed InPlaceRewriteDeadlineMs deadline_value_in_milliseconds;</pre>
+</dl>
+
+ <p>
+ This directive can be used
+ in <a href="configuration#htaccess">location-specific configuration
+ sections</a>.
+ </p>
+<!--
+ <p>
+ Furthermore, in-place resource optimization allows more expansive rewriting
+ with <a href="#uncacheable_optimization">optimize uncacheable resources</a>.
+ </p>
+-->
+ <h3>Considerations</h3>
+ <p>Resources optimized by in-place resource optimization are optimized
+ differently from resources found in HTML, JS, and CSS. First, rewritten
+ pagespeed URLs contain a content hash that enables the optimized data to be
+ cached for a year by browser and proxy caches; in-place resources are not
+ cache extended. Second, in-place resources can't be optimized specially for
+ the context in which they occur on the page: images can't be resized to the
+ size they appear on the page, and multiple resources on a page can't be
+ combined together. Finally, in-place resources that are eligible for
+ browser-specific optimizations (such as conversion to the WebP image format)
+ will be served with the <code>Vary: User-Agent</code> caching header,
+ reducing caching at intermediate proxies.</p>
+ <h3>Risks</h3>
+ <p>In-place resource optimization will add a new cache entry for every
+ unique URL requested. It will also copy each request into memory once. If
+ you have a large site with many uncacheable resources, this could quickly
+ fill up your cache or cause a lot of expensive string copies.</p>
+ <p>In-place optimization will also add a small delay to every server
+ response, this should not be large and we have not been able to measure any
+ noticeable slow-down, but if most of your resources are uncacheable, you may
+ wish to avoid this cost.</p>
+
+ <!--
+ <h2 id="uncacheable_optimization">Optimizing Uncacheable Resources</h2>
+ <p>
+ By default PageSpeed does not optimize resources that are uncacheable
+ or if Cache-Control header is set to private or no-store.
+ For sites where it's more important to optimize for bandwidth than
+ latency, it is desirable to optimize uncacheable resources.
+ By using the combination of flags shown below it is possible to optimize
+ uncacheable resources without storing them in the cache. This works only
+ when <a href="#ipro">in-place resource optimization</a> is enabled.
+ </p>
+ <p class="warning">
+ Note, that this setting can be very CPU intensive for the sites that have
+ a lot of private/uncacheable resources.
+ </p>
+ <p>
+ The flags which are required to be set are:
+ </p>
+
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint">
+ModPagespeedRewriteUncacheableResources on
+ModPagespeedInPlaceWaitForOptimized on
+ModPagespeedInPlaceResourceOptimization on</pre>
+</dl>
+ <p>
+ The <code>RewriteUncacheableResources</code> directive
+ can <strong>not</strong> be used
+ in <a href="configuration#htaccess">location-specific configuration
+ sections</a>.
+ </p>
+ -->
+
+ <h2 id="rate_limit_background_fetches">Rate Limit Background Fetches</h2>
+ <p>
+ To avoid overloading the origin server, PageSpeed will limit the number
+ of background fetches it makes on a per-domain basis. As PageSpeed makes
+ fetches it keeps a count of how many ongoing fetches there are for each
+ domain, and if there are too many then additional fetches will only be
+ allowed through if they're for user-facing requests. Other fetches
+ (background fetches) will be queued up for completion later. If the
+ queue gets too large, PageSpeed will give up on those background
+ optimizations, leaving them to be reinitiated in response to a later
+ request. This feature can be disabled by
+ setting <code>RateLimitBackgroundFetches</code> to <code>off</code>:
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedRateLimitBackgroundFetches off</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed RateLimitBackgroundFetches off;</pre>
+</dl>
+ </p>
+ <p>
+ This feature depends on <a href="admin#statistics">shared memory
+ statistics</a>, which are also enabled by default.
+ </p>
+
+ <h2 id="gzip_cache">Configuring HTTPCache Compression for PageSpeed</h2>
+ <p>
+ <p class="note"><strong>Note: HTTPCache Compression is a new feature as of
+ 1.10.33.0</strong></p>
+ In order to rewrite resources, PageSpeed must cache them server-side.
+ Until 1.10.33.0, these resources had been stored uncompressed.
+ To reduce disk usage, decrease server latency, support higher compression
+ levels, and increase server throughput, the HTTPCache can automatically
+ <a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/optimize-encoding-and-transfer">gzip</a>
+ compressable resources as they are stored in the cache.
+ To configure cache compression, set <code>HttpCacheCompressionLevel</code>
+ to values between <code>-1</code> and <code>9</code>, with <code>0</code>
+ being off, <code>-1</code> being gzip's default compression, and
+ <code>9</code> being maximum compression. The default value is 9, maximum
+ compression.
+<dl>
+ <dt>Apache:<dd><pre class="prettyprint"
+ >ModPagespeedHttpCacheCompressionLevel 9</pre>
+ <dt>Nginx:<dd><pre class="prettyprint"
+ >pagespeed HttpCacheCompressionLevel 9;</pre>
+</dl>
+ </p>
+
+ <h2 id="nginx_script_variables">Scripting ngx_pagespeed</h2>
+ <p class="note"><strong>Note: New feature as of 1.9.32.1</strong></p>
+ <p class="note"><strong>Note: Extended in 1.12.34.1</strong></p>
+ <p class="note"><strong>Note: Nginx-only</strong></p>
+
+ <p>
+ PageSpeed supports
+ Nginx's <a href="http://nginx.org/en/docs/varindex.html">script
+ variables</a> in some directives. You can use this to
+ adjust these settings on a per-request basis.
+ </p>
+
+ <p>
+ Script support must be enabled at the top level. To turn it on for a
+ subset of directives, which is the only method supported in 1.11 and
+ earlier, set:
+<pre class="prettyprint">
+http {
+ pagespeed ProcessScriptVariables on;
+ ...
+}</pre>
+ </p>
+
+ <p>
+ This allows scripts in the following directives:
+ </p>
+
+ <table>
+ <tr><th>Setting<th>Script Support Added
+ <tr><td><a href="domains#LoadFromFileScriptVariables"
+ >LoadFromFile*</a>
+ <td>1.9.32.1</td>
+ <tr><td><a href="downstream-caching#script-variables"
+ >DownstreamCachePurgeLocationPrefix</a>
+ <td>1.10.33.0
+ <tr><td><a href="downstream-caching#script-variables"
+ >DownstreamCachePurgeMethod</a>
+ <td>1.10.33.0
+ <tr><td><a href="downstream-caching#script-variables"
+ >DownstreamCacheRewrittenPercentageThreshold</a>
+ <td>1.10.33.0
+ <tr><td><a href="https_support#h2_configuration_nginx"
+ >EnableFilters</a>
+ <td>1.10.33.0
+ <tr><td><a href="https_support#h2_configuration_nginx"
+ >DisableFilters</a>
+ <td>1.10.33.0
+ <tr><td><a href="https_support#h2_configuration_nginx"
+ >ShardDomain</a>
+ <td>1.10.33.0
+ </table>
+
+ <p>
+ In version 1.12.34.1 and later, you may instead set:
+ <pre class="prettyprint">
+http {
+ pagespeed ProcessScriptVariables all;
+ ...
+}</pre>
+ </p>
+
+ <p>
+ This will allow scripts in all directives, not just the seven specified
+ above.
+ </p>
+
+ <p>
+ Because Nginx uses the <code>$</code>-sign to indicate script variables,
+ when you turn on <code>ProcessScriptVariables</code> you need to make a
+ small change to any script-supporting commands that are
+ using <code>$</code>. For example, if you had:
+<pre class="prettyprint">
+pagespeed LoadFromFileRuleMatch Disallow \.ssp.css$;</pre>
+ Then you would need to replace <code>$</code>
+ with <code>$ps_dollar</code>:
+<pre class="prettyprint">
+pagespeed LoadFromFileRuleMatch Disallow \.ssp.css$ps_dollar;</pre>
+ </p>
+ <p>
+ If you have a server that you don't want the scripted configuration to
+ apply, specify <code>ClearInheritedScripts</code>. For example:
+ </p>
+<pre class="prettyprint">
+http {
+ pagespeed ProcessScriptVariables on;
+ pagespeed LoadFromFile "http://$host/static" "$document_root/static";
+ ...
+ server {
+ server_name example.com;
+ root /var/www/ec;
+
+ # PageSpeed will load example.com/static/foo from /var/www/ec/static/foo
+ # directly, without going through the rest of nginx.
+ }
+ server {
+ server_name example.org;
+ root /var/www/eo;
+
+ pagespeed ClearInheritedScripts;
+
+ # This server block won't see that LoadFromFile config at all, so PageSpeed
+ # will load example.org/static/foo by asking nginx for /static/foo over
+ # http.
+ }
+}</pre>
+
+ </div>
+ <!--#include virtual="_footer.html" -->
+ </body>
+</html>
diff --git a/incubator.png b/incubator.png
new file mode 100644
index 0000000..338169e
--- /dev/null
+++ b/incubator.png
Binary files differ
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..cf182db
--- /dev/null
+++ b/index.html
@@ -0,0 +1,291 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html><head><meta name="viewport" content="width=device-width, initial-scale=1">
+<title>PageSpeed Modules</title></head>
+<link rel="stylesheet" type="text/css" href="doc/doc.css"/>
+<style>
+body {
+ font-family: sans-serif;
+ margin: 0;
+ padding: 0;
+ line-height: 1.5;
+ word-wrap: break-word;
+}
+
+#content p {
+ max-width: 40em;
+}
+
+a {
+ color: #0288d1;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+#header, #navline {
+ color: white;
+}
+
+#logoline {
+ background-color: #0061ff;
+ padding: 1em;
+}
+
+#logo {
+ display: inline-block;
+ position: relative;
+ top: 4px;
+}
+
+#logotext {
+ font-size: 32px;
+ display: inline-block;
+}
+
+#content {
+ margin: 1em;
+ margin-top: 2em;
+}
+
+#banner {
+ height: 9em;
+ position: relative;
+ text-align: justify;
+ margin-left: auto;
+ margin-right: auto;
+ border-top: 1px solid silver;
+}
+
+#banner::before {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ opacity: .3;
+ content: "";
+ z-index: -1;
+ background-image: url(network-loading.png);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+
+
+
+#banner-logo-container {
+ height: 8em;
+
+ margin-top: 0.5em;
+ margin-left: auto;
+ margin-right: auto;
+ display: block;
+ position:relative;
+ width: 150px;
+
+ background-image: url(pagespeed+nginx+apache.svg);
+ background-size: contain;
+ background-position: center center;
+}
+
+
+#grey-stripe {
+ height: 0.5em;
+ background-color: #888;
+}
+
+#resources p {
+ max-width: 33em;
+}
+
+#resources h2, #resources h3 {
+ color: #757575;
+ font-weight: normal;
+}
+
+#resources a {
+ margin-right: 2em;
+ white-space: nowrap;
+}
+
+@media (min-width: 37em) {
+ .resource {
+ width: 35em;
+ display: inline-block;
+ vertical-align: top;
+ }
+}
+
+h2 {
+ border-bottom: 1px dashed silver;
+}
+
+</style>
+
+<body>
+
+<div id=header>
+ <div id=logoline>
+ <div id=logo>
+ <img src="https://www.gstatic.com/images/branding/product/1x/pagespeed_32dp.png"
+ srcset="https://www.gstatic.com/images/branding/product/2x/pagespeed_32dp.png"
+ width=32 height=32 alt="pagespeed logo">
+ </div>
+ <div id=logotext>Apache PageSpeed (Incubating)</div>
+ </div>
+</div>
+
+<div id=banner>
+ <div id="banner-logo-container"></div>
+</div>
+
+<div id=grey-stripe></div>
+ <img src="/incubator.png" height="80" align="right">
+
+<div id=content-wrapper>
+<div id=content>
+
+ <p>
+ The PageSpeed Modules, <a href="https://github.com/apache/incubator-pagespeed-mod" target="_blank">mod_pagespeed</a> and
+ <a href="https://github.com/apache/incubator-pagespeed-ngx" target="_blank">ngx_pagespeed</a>, are open-source
+ webserver modules that <a href="/doc/filters">optimize your site automatically</a>.
+ </p>
+
+ <p class="note">
+ <strong>Disclaimer</strong>:
+ Apache PageSpeed is an effort undergoing incubation at The
+ Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+ Incubation is required of all newly accepted projects until a further
+ review indicates that the infrastructure, communications, and
+ decision making process have stabilized in a manner consistent with
+ other successful ASF projects. While incubation status is not
+ necessarily a reflection of the completeness or stability of
+ the code, it does indicate that the project has yet to be fully
+ endorsed by the ASF.</p>
+</div>
+
+ <div id=resources>
+ <h2>Install on your webserver</h2>
+
+ <div class=resource-group>
+ <div class=resource>
+ <h3>Packages for Apache</h3>
+ <p>Pre-built binary packages for Apache</p>
+ <a href="doc/download">Download Packages</a>
+ </div>
+
+ <div class=resource>
+ <h3>Source for Nginx</h3>
+ <p>Build from source on Nginx</p>
+ <a href="doc/build_ngx_pagespeed_from_source">Download Source</a>
+ </div>
+ <div>
+
+ <h2>Read Documentation</h2>
+
+ <div class=resource-group>
+ <div class=resource>
+ <h3>Configuring PageSpeed for your site</h3>
+ <p>Read how to enable the module and adjust it for your system</p>
+ <a href="doc/">Documentation</a>
+ <a href="doc/release_notes">Release Notes</a>
+ </div>
+ <div class=resource>
+ <h3>Examples</h3>
+ <p>Examples of PageSpeed optimization filters in action.</p>
+ <a target="_blank" href="examples/">Examples</a>
+ </div>
+ </div>
+
+ <h2>Get Support</h2>
+
+ <div class=resource-group>
+ <div class=resource>
+ <h3>Ask a question on the mailing list</h3>
+ <p>On our discussion mailing lists you can ask questions and get help from
+ the developers and other users.</p>
+ <a href="https://groups.google.com/group/mod-pagespeed-discuss">Apache</a>
+ <a href="https://groups.google.com/group/ngx-pagespeed-discuss">Nginx</a>
+ <h3>IRC</h3>
+ <p>Join our <strong>#pagespeed</strong> channel on irc.freenode.net</p>
+ </div>
+
+ <div class=resource>
+ <h3>File a bug</h3>
+ <p>If PageSpeed isn't working correctly on your site, file a bug and we'll
+ look into it.</p>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/issues/new">Apache</a>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx/issues/new">Nginx</a>
+ </div>
+ </div>
+
+ <h2>Make Changes</h2>
+ <div class=resource-group>
+ <div class=resource>
+ <h3>Get the source</h3>
+ <p>Download the source code, to build on your machine.</p>
+ <a href="https://github.com/apache/incubator-pagespeed-mod">Apache</a>
+ <a href="https://github.com/apache/incubator-pagespeed-ngx">Nginx</a>
+ </div>
+
+ <div class=resource>
+ <h3>Join the project mailing list</h3>
+ <p>Talk about code changes, designs, refactoring, and new features. If
+ you're interested in getting started with PageSpeed development,
+ introduce yourself here!</p>
+ <a href="https://lists.apache.org/list.html?dev@pagespeed.apache.org">pagespeed-dev@</a>
+ </div>
+
+ <div class=resource>
+ <h3>Read the wiki</h3>
+ <p>All our developer-focused documentation, from how to get started with
+ a development environment, to running tests, to our list of
+ priorities.</p>
+ <a href="https://github.com/apache/incubator-pagespeed-mod/wiki">Wiki</a>
+ </div>
+
+ <div class=resource>
+ <h3>API Documentation</h3>
+ <p>Documentation for the PageSpeed optimization libraries.</p>
+ <a target="_blank" href="/psol/annotated.html">API Documentation</a>
+ </div>
+ </div>
+
+ <h2>Related Projects</h2>
+
+ <div class=resource-group>
+ <div class=resource>
+ <h3>Other PageSpeed integrations</h3>
+ <p>While mod_pagespeed (Apache) and ngx_pagesped (Nginx) are the only two
+ server integrations developed by the core PageSpeed team, people have
+ ported PageSpeed to other servers as well.</p>
+ <a href="https://www.iiswebspeed.com/">IIS</a>
+ <a href="https://github.com/apache/trafficserver/tree/master/plugins/experimental/ats_pagespeed">Traffic Server</a>
+ <a href="http://open.litespeedtech.com/mediawiki/index.php/Help:Modules:PageSpeed">OpenLiteSpeed</a>
+ </div>
+ </div>
+ </div>
+
+</div>
+</div>
+
+</body></html>
diff --git a/network-loading.png b/network-loading.png
new file mode 100644
index 0000000..87c4583
--- /dev/null
+++ b/network-loading.png
Binary files differ
diff --git a/pagespeed+nginx+apache.svg b/pagespeed+nginx+apache.svg
new file mode 100644
index 0000000..bb22d52
--- /dev/null
+++ b/pagespeed+nginx+apache.svg
@@ -0,0 +1,658 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="756.38092"
+ height="653.2381"
+ id="svg2">
+ <defs
+ id="defs4">
+ <linearGradient
+ x1="-6953.3999"
+ y1="1134.7"
+ x2="-6012"
+ y2="1134.7"
+ id="j"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3529"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3531"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3533"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3535"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-9346.0996"
+ y1="1137.7"
+ x2="-5087"
+ y2="1137.7"
+ id="a"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3520"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3522"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3524"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3526"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-9346.0996"
+ y1="1152.7"
+ x2="-5087"
+ y2="1152.7"
+ id="b"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3511"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3513"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3515"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3517"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-9610.2998"
+ y1="999.72998"
+ x2="-5351.2002"
+ y2="999.72998"
+ id="c"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3502"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3504"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3506"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3508"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-9346.0996"
+ y1="1021.6"
+ x2="-5087"
+ y2="1021.6"
+ id="d"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3493"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3495"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3497"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3499"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-9035.5"
+ y1="638.44"
+ x2="-6797.2002"
+ y2="638.44"
+ id="e"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3484"
+ style="stop-color:#282662;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3486"
+ style="stop-color:#662e8d;stop-opacity:1"
+ offset="0.095484" />
+ <stop
+ id="stop3488"
+ style="stop-color:#9f2064;stop-opacity:1"
+ offset="0.78820002" />
+ <stop
+ id="stop3490"
+ style="stop-color:#cd2032;stop-opacity:1"
+ offset="0.94870001" />
+ </linearGradient>
+ <linearGradient
+ x1="-9346.0996"
+ y1="580.82001"
+ x2="-5087"
+ y2="580.82001"
+ id="f"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3475"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3477"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3479"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3481"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-9071.2002"
+ y1="1047.7"
+ x2="-6533.2002"
+ y2="1047.7"
+ id="g"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3466"
+ style="stop-color:#282662;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3468"
+ style="stop-color:#662e8d;stop-opacity:1"
+ offset="0.095484" />
+ <stop
+ id="stop3470"
+ style="stop-color:#9f2064;stop-opacity:1"
+ offset="0.78820002" />
+ <stop
+ id="stop3472"
+ style="stop-color:#cd2032;stop-opacity:1"
+ offset="0.94870001" />
+ </linearGradient>
+ <linearGradient
+ x1="-9585.2998"
+ y1="620.5"
+ x2="-5326.2002"
+ y2="620.5"
+ id="h"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3457"
+ style="stop-color:#9e2064;stop-opacity:1"
+ offset="0.3233" />
+ <stop
+ id="stop3459"
+ style="stop-color:#c92037;stop-opacity:1"
+ offset="0.63020003" />
+ <stop
+ id="stop3461"
+ style="stop-color:#cd2335;stop-opacity:1"
+ offset="0.75139999" />
+ <stop
+ id="stop3463"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-5167.1001"
+ y1="697.54999"
+ x2="-4570.1001"
+ y2="1395.6"
+ id="i"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)">
+ <stop
+ id="stop3450"
+ style="stop-color:#f69923;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3452"
+ style="stop-color:#f79a23;stop-opacity:1"
+ offset="0.3123" />
+ <stop
+ id="stop3454"
+ style="stop-color:#e97826;stop-opacity:1"
+ offset="0.83829999" />
+ </linearGradient>
+ <linearGradient
+ x1="-9035.5"
+ y1="638.44"
+ x2="-6797.2002"
+ y2="638.44"
+ id="linearGradient3869"
+ xlink:href="#e"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-5167.1001"
+ y1="697.54999"
+ x2="-4570.1001"
+ y2="1395.6"
+ id="linearGradient3871"
+ xlink:href="#i"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9585.2998"
+ y1="620.5"
+ x2="-5326.2002"
+ y2="620.5"
+ id="linearGradient3873"
+ xlink:href="#h"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9346.0996"
+ y1="580.82001"
+ x2="-5087"
+ y2="580.82001"
+ id="linearGradient3875"
+ xlink:href="#f"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9346.0996"
+ y1="1021.6"
+ x2="-5087"
+ y2="1021.6"
+ id="linearGradient3877"
+ xlink:href="#d"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9610.2998"
+ y1="999.72998"
+ x2="-5351.2002"
+ y2="999.72998"
+ id="linearGradient3879"
+ xlink:href="#c"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9346.0996"
+ y1="1152.7"
+ x2="-5087"
+ y2="1152.7"
+ id="linearGradient3881"
+ xlink:href="#b"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9346.0996"
+ y1="1137.7"
+ x2="-5087"
+ y2="1137.7"
+ id="linearGradient3883"
+ xlink:href="#a"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-6953.3999"
+ y1="1134.7"
+ x2="-6012"
+ y2="1134.7"
+ id="linearGradient3885"
+ xlink:href="#j"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <linearGradient
+ x1="-9071.2002"
+ y1="1047.7"
+ x2="-6533.2002"
+ y2="1047.7"
+ id="linearGradient3887"
+ xlink:href="#g"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.21591,0.044142,-0.044142,-0.21591,-974.83,437.49)" />
+ <radialGradient
+ cx="12.333"
+ cy="171.33299"
+ r="219.577"
+ id="radialGradient3889"
+ xlink:href="#SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,-1,0,194)" />
+ </defs>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-38.952392,799.97114)"
+ id="layer1">
+ <g
+ transform="matrix(4.297619,0,0,4.297619,4.57144,-885.92352)"
+ id="g3807">
+ <path
+ d="M 0,0 H 192 V 192 H 0 V 0 z"
+ id="path3757"
+ style="fill:none" />
+ <g
+ id="g3759">
+ <g
+ id="g3761">
+ <path
+ d="m 184,44 v 116 c 0,6.63 -5.37,12 -12,12 H 20 C 13.37,172 8,166.63 8,160 V 44 h 176 z"
+ id="path3763"
+ style="fill:#e1e1e1" />
+ <path
+ d="m 20,20 h 152 c 6.63,0 12,5.37 12,12 V 44 H 8 V 32 C 8,25.37 13.37,20 20,20 z"
+ id="path3765"
+ style="fill:#c2c2c2" />
+ <path
+ d="M 172,20 H 20 C 13.4,20 8,25.4 8,32 v 1 C 8,26.4 13.4,21 20,21 h 152 c 6.6,0 12,5.4 12,12 v -1 c 0,-6.6 -5.4,-12 -12,-12 z"
+ id="path3767"
+ style="fill:#ffffff;fill-opacity:0.2" />
+ <path
+ d="m 8,44 h 176 v 1 H 8 v -1 z"
+ id="path3769"
+ style="fill:#212121;fill-opacity:0.1" />
+ <path
+ d="m 95.93,80 c -35.36,0 -63.9,28.65 -63.9,64 0,1.34 -0.08,3 0,4 h 27.88 c -0.15,-1 0,-2.65 0,-4 0,-19.88 16.13,-36 36.02,-36 6.92,0 13.39,1.96 18.88,5.34 l 20.1,-20.1 C 124.11,84.94 110.6,80 95.93,80 z"
+ id="path3771"
+ style="fill:#4285f4" />
+ <path
+ d="m 134.91,93.24 -20.1,20.1 c 10.28,6.34 17.14,17.7 17.14,30.66 0,1.35 0.15,3 0,4 h 28.01 c 0.08,-1 0,-2.66 0,-4 0,-20.68 -9.82,-39.06 -25.05,-50.76 z"
+ id="path3773"
+ style="fill:#f44336" />
+ <circle
+ cx="24"
+ cy="32"
+ r="4"
+ id="circle3775"
+ style="fill:#eeeeee" />
+ <circle
+ cx="40"
+ cy="32"
+ r="4"
+ id="circle3777"
+ style="fill:#eeeeee" />
+ <path
+ d="M 172.02,171 H 19.96 c -6.6,0 -12,-5.4 -12,-12 v 1 c 0,6.6 5.4,12 12,12 h 152.06 c 6.6,0 12,-5.4 12,-12 v -1 c 0,6.6 -5.4,12 -12,12 l 0,0 z"
+ id="path3779"
+ style="fill:#212121;fill-opacity:0.1" />
+ <path
+ d="m 135.12,95.67 c 0.24,-0.33 0.38,-0.73 0.38,-1.17 0,-1.1 -0.9,-2 -2,-2 -0.47,0 -0.89,0.17 -1.23,0.44 l -43.61,33.57 c -2.84,2.19 -4.67,5.62 -4.67,9.49 0,6.63 5.37,12 12,12 4.35,0 8.14,-2.32 10.25,-5.78 l 0.01,0.01 28.87,-46.56 0,0 z"
+ id="path3781"
+ style="fill:#9e9e9e" />
+ <path
+ d="m 88.66,127.51 43.61,-33.58 c 0.34,-0.27 0.77,-0.44 1.23,-0.44 0.92,0 1.69,0.63 1.92,1.48 0.04,-0.15 0.08,-0.31 0.08,-0.48 0,-1.1 -0.9,-2 -2,-2 -0.47,0 -0.89,0.17 -1.23,0.44 L 88.66,126.5 c -2.84,2.19 -4.67,5.62 -4.67,9.49 0,0.18 0.02,0.36 0.03,0.54 0.14,-3.66 1.92,-6.91 4.64,-9.02 z"
+ id="path3783"
+ style="opacity:0.2;fill:#ffffff" />
+ <path
+ d="m 135.12,95.67 -28.87,46.56 -0.01,-0.01 c -2.11,3.46 -5.9,5.78 -10.25,5.78 -6.45,0 -11.69,-5.09 -11.97,-11.46 -0.01,0.15 -0.03,0.3 -0.03,0.46 0,6.63 5.37,12 12,12 4.35,0 8.14,-2.32 10.25,-5.78 l 0.01,0.01 28.87,-46.56 c 0.24,-0.33 0.38,-0.73 0.38,-1.17 0,-0.18 -0.03,-0.36 -0.08,-0.52 -0.06,0.25 -0.16,0.48 -0.3,0.69 z"
+ id="path3785"
+ style="opacity:0.2;fill:#212121" />
+ <linearGradient
+ x1="113.7175"
+ y1="72.717499"
+ x2="170.8495"
+ y2="15.5855"
+ id="SVGID_1_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,-1,0,194)">
+ <stop
+ id="stop3788"
+ style="stop-color:#212121;stop-opacity:0.2"
+ offset="0" />
+ <stop
+ id="stop3790"
+ style="stop-color:#212121;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <path
+ d="m 135.09,93.3 c 0.26,0.34 0.41,0.75 0.41,1.2 0,0.44 -0.14,0.84 -0.38,1.17 l -28.87,46.56 -0.01,-0.01 c -2.11,3.46 -5.9,5.78 -10.25,5.78 -2.97,0 -5.68,-1.08 -7.78,-2.87 L 115.08,172 H 172 c 6.63,0 12,-5.37 12,-12 V 142.21 L 135.09,93.3 z"
+ id="path3792"
+ style="fill:url(#SVGID_1_)" />
+ </g>
+ <radialGradient
+ cx="12.333"
+ cy="171.33299"
+ r="219.577"
+ id="SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,-1,0,194)">
+ <stop
+ id="stop3795"
+ style="stop-color:#ffffff;stop-opacity:0.1"
+ offset="0" />
+ <stop
+ id="stop3797"
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="1" />
+ </radialGradient>
+ <path
+ d="m 184,32 c 0,-6.63 -5.37,-12 -12,-12 L 20,20 C 13.37,20 8,25.37 8,32 L 8,97.662048 8,160 c 0,6.63 5.37,12 12,12 l 152,0 c 6.63,0 12,-5.37 12,-12 z"
+ id="path3799"
+ style="fill:url(#radialGradient3889)" />
+ </g>
+ </g>
+ <g
+ transform="matrix(0.60728573,0,0,0.60728573,243.80108,-700.71388)"
+ id="g3832">
+ <g
+ transform="matrix(3.1322027,0,0,3.1322027,448.21255,-141.96415)"
+ id="layer1-6">
+ <path
+ d="m 14.047838,32.727592 0,-19.064695 19.062499,19.064695 0,-19.064695"
+ id="path2996"
+ style="fill:none;stroke:#009900;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="M 44.6875,11.1875 44,12.46875 38.6875,22.125 38,23.34375 38.6875,24.5625 44,33.90625 l 0.71875,1.28125 1.46875,0 10.875,0 1.5625,0 0.6875,-1.40625 3.96875,-8 1.78125,-3.625 -4.03125,0 L 50.875,22.1875 c -1.320782,-0.01868 -2.535605,1.179086 -2.535605,2.5 0,1.320914 1.214823,2.518679 2.535605,2.5 L 57,27.15625 l -1.5,3.03125 -7.875,0 -3.90625,-6.875 3.9375,-7.125 8.377221,0 1.953125,4.007812 5.03125,0 -3.171875,-7.601562 -0.6875,-1.40625 -1.5625,0 -11.408471,0 z"
+ id="path2996-0"
+ style="fill:#009900" />
+ <path
+ d="m 70.013782,11.15625 c -1.308989,0.01639 -2.485084,1.222261 -2.46875,2.53125 l 0,6.514509 5,0 0,-6.514509 c 0.01659,-1.329821 -1.201429,-2.547843 -2.53125,-2.53125 z"
+ id="path2996-0-5"
+ style="fill:#009900" />
+ <use
+ transform="matrix(-1,0,0,1,111.13905,0.04841623)"
+ id="use3820"
+ x="0"
+ y="0"
+ width="744.09448"
+ height="1052.3622"
+ xlink:href="#path2996" />
+ <g
+ transform="translate(0.10586251,0.33010228)"
+ id="g3920">
+ <path
+ d="m 104.90935,13.374209 19.08481,19.017856"
+ id="path2996-1"
+ style="fill:none;stroke:#009900;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <use
+ transform="matrix(-1,0,0,1,228.92583,0)"
+ id="use3851"
+ x="0"
+ y="0"
+ width="744.09448"
+ height="1052.3622"
+ xlink:href="#path2996-1" />
+ </g>
+ <path
+ d="m 70.013782,35.204069 c -1.308989,-0.01639 -2.485084,-1.222261 -2.46875,-2.53125 l 0,-10.464363 5,0 0,10.464363 c 0.01659,1.329821 -1.201429,2.547843 -2.53125,2.53125 z"
+ id="path2996-0-5-1"
+ style="fill:#009900" />
+ </g>
+ <g
+ transform="matrix(0.43303041,0,0,0.43303041,68.42211,-134.9456)"
+ id="g3640"
+ style="enable-background:new">
+ <g
+ transform="translate(-3.9433,180.23)"
+ id="g3537">
+ <path
+ d="m 656.71,-7.0909 c 20.267,-9.5939 39.714,-20.144 58.137,-31.855 0.64586,-0.42398 1.3003,-0.79943 1.9461,-1.2234 -7.5146,19.097 -3.8382,52.585 -3.7537,52.44 11.85,-34.711 26.515,-65.255 48.744,-84.672 8.4826,7.5928 14.923,21.83 20.214,39.882 2.6186,-24.849 -1.858,-38.732 -4.0514,-43.799 10.917,12.948 30.734,20.176 52.045,26.46 -23.946,-14.536 -39.792,-28.878 -46.004,-42.955 68.312,-21.018 142.29,-46.157 219.96,-74.026 -6.0925,-4.5911 -12.639,-5.1694 -19.442,-3.1706 -14.023,5.1017 -106.22,38.312 -231.64,76.244 -3.5629,1.0778 -7.1567,2.1511 -10.768,3.2375 -1.0067,0.30738 -2.0264,0.59708 -3.0153,0.89135 -13.174,3.9515 -26.666,7.9189 -40.462,11.92 -3.1433,0.90384 -6.2865,1.8077 -9.4475,2.7247 -0.0663,0.02188 -0.13246,0.04334 -0.18106,0.052 l -34.514,68.935 c 0.7115,-0.33546 1.4939,-0.72358 2.2408,-1.0853 z"
+ id="path3539"
+ style="fill:url(#linearGradient3869)" />
+ <path
+ d="m 23.148,66.817 c 19.071,7.1961 39.608,9.0845 59.733,11.274 11.854,1.1234 23.738,1.9142 35.63,2.4926 8.1692,-17.104 16.338,-34.207 24.508,-51.311 -31.491,0.85648 -63.087,0.17618 -94.393,-3.5401 30.943,3.103 62.137,1.8494 93.129,0.17007 -22.37,-26.669 -46.909,-51.428 -71.93,-75.588 -23.519,11.839 -46.291,28.35 -58.634,52.244 -6.3001,14.546 -9.9508,31.534 -4.821,46.981 2.7562,7.894 9.065,14.16 16.773,17.277 z"
+ id="path3541"
+ style="fill:url(#linearGradient3871)" />
+ <path
+ d="m 280.24,-67.689 c -0.15352,-0.13308 -0.28936,-0.27929 -0.4429,-0.41235 l 2.6202,2.831 c 0.23288,0.12909 0.43954,0.22281 0.65472,0.36504 -0.94684,-0.94406 -1.8983,-1.8573 -2.832,-2.7836 z"
+ id="path3543"
+ style="fill:none" />
+ <path
+ d="m 368.72,-99.465 c 1.6889,1.4638 3.3155,3.0287 4.9198,4.6376 -1.6043,-1.6088 -3.2487,-3.1606 -4.9198,-4.6376 z"
+ id="path3545"
+ style="fill:none" />
+ <path
+ d="m 640.89,-71.354 c -0.77256,0.21613 -1.5451,0.43223 -2.3045,0.66606 -15.919,4.505 -31.444,8.8006 -46.643,12.908 -17.052,4.6045 -33.627,8.9648 -49.773,13.089 -17.016,4.3579 -33.536,8.4584 -49.579,12.315 -16.829,4.0548 -33.127,7.826 -48.887,11.362 -12.825,2.8692 -25.296,5.586 -37.426,8.1328 -4.0333,0.85047 -8.0489,1.6878 -12.029,2.4989 -7.881,1.6182 -15.643,3.1754 -23.223,4.6806 -7.0114,1.385 -13.886,2.6958 -20.659,3.9587 -2.2547,0.43715 -4.4872,0.83034 -6.7242,1.2544 -0.3574,0.072954 -0.72796,0.12822 -1.0854,0.20118 l 2.2258,2.4101 -2.5583,5.1341 c 0.55154,-0.10716 1.0985,-0.18347 1.6632,-0.27291 10.236,-1.7727 20.516,-3.6333 30.84,-5.5819 5.9654,-1.1307 11.949,-2.2746 17.936,-3.4492 16.6,-3.2538 33.24,-6.675 49.89,-10.268 16.826,-3.614 33.632,-7.4045 50.376,-11.314 16.449,-3.8277 32.823,-7.7924 49.096,-11.819 16.242,-4.0316 32.358,-8.1608 48.306,-12.331 16.654,-4.3643 33.08,-8.7783 49.245,-13.247 3.6463,-1.0025 7.2925,-2.0049 10.926,-3.0251 13.032,-3.6261 25.843,-7.2535 38.464,-10.878 l 4.0558,-8.1098 -2.4975,-2.7025 c -0.37966,0.11693 -0.7594,0.23382 -1.1214,0.3376 -16.542,4.885 -32.709,9.5737 -48.514,14.048 z"
+ id="path3547"
+ style="fill:none" />
+ <path
+ d="m 374.86,-93.622 c -0.012,-0.01769 -0.0309,-0.0044 -0.0441,-0.02219 0,0 0.012,0.01769 0.0441,0.02219 z"
+ id="path3549"
+ style="fill:none" />
+ <path
+ d="m 415.36,-112.67 c 2.517,2.3588 5.0819,4.8192 7.717,7.3373 0.012,0.0177 0.0441,0.0222 0.057,0.04 -1.2887,-1.2942 -2.5643,-2.5706 -3.8622,-3.8031 -1.2979,-1.2325 -2.5872,-2.4165 -3.9119,-3.5742 z"
+ id="path3551"
+ style="fill:#be202e" />
+ <path
+ d="m 415.36,-112.67 c 2.517,2.3588 5.0819,4.8192 7.717,7.3373 0.012,0.0177 0.0441,0.0222 0.057,0.04 -1.2887,-1.2942 -2.5643,-2.5706 -3.8622,-3.8031 -1.2979,-1.2325 -2.5872,-2.4165 -3.9119,-3.5742 z"
+ id="path3553"
+ style="opacity:0.35;fill:#be202e" />
+ <path
+ d="m 374.77,-93.666 c 0,0 0.012,0.01768 0.0309,0.0046 0.012,0.01769 0.0309,0.0044 0.0441,0.02219 -0.39436,-0.42092 -0.81102,-0.79786 -1.1923,-1.2011 -1.6175,-1.6266 -3.2618,-3.1783 -4.9198,-4.6376 1.9685,1.915 3.9986,3.8391 6.0373,5.8118 z"
+ id="path3555"
+ style="fill:#be202e" />
+ <path
+ d="m 374.77,-93.666 c 0,0 0.012,0.01768 0.0309,0.0046 0.012,0.01769 0.0309,0.0044 0.0441,0.02219 -0.39436,-0.42092 -0.81102,-0.79786 -1.1923,-1.2011 -1.6175,-1.6266 -3.2618,-3.1783 -4.9198,-4.6376 1.9685,1.915 3.9986,3.8391 6.0373,5.8118 z"
+ id="path3557"
+ style="opacity:0.35;fill:#be202e" />
+ <path
+ d="m 294.05,14.992 c -16.961,2.5069 -33.723,4.7285 -50.218,6.643 -17.122,1.9948 -33.955,3.6385 -50.416,4.8964 -0.9569,0.07847 -1.9446,0.15235 -2.9192,0.24395 -16.218,1.2152 -32.064,2.0446 -47.489,2.4796 l -24.508,51.311 c 3.1595,0.15406 6.3543,0.2819 9.6108,0.41887 12.251,0.46429 25.27,0.74328 38.902,0.81409 15.365,0.07595 31.56,-0.1344 48.36,-0.60148 15.522,-0.45209 31.601,-1.1524 48.051,-2.1282 14.003,-0.83512 28.316,-1.8448 42.838,-3.0914 0.5424,-0.0455 1.068,-0.07818 1.6104,-0.12365 13.32,-22.17 22.89,-45.722 34.335,-68.583 -16.183,2.7801 -32.241,5.3583 -48.157,7.7211 z"
+ id="path3559"
+ style="fill:url(#linearGradient3873)" />
+ <path
+ d="m 639.56,-61.012 c -16.179,4.4506 -32.604,8.8647 -49.245,13.247 -15.935,4.1875 -32.046,8.2859 -48.306,12.331 -16.26,4.0447 -32.63,7.9786 -49.096,11.819 -16.744,3.9098 -33.563,7.6825 -50.376,11.314 -16.632,3.5798 -33.29,7.0141 -49.89,10.268 -5.9877,1.1747 -11.971,2.3185 -17.936,3.4492 -10.325,1.9485 -20.605,3.8091 -30.84,5.5819 -0.55156,0.10715 -1.0985,0.18346 -1.6632,0.2729 l -34.33,68.583 c 1.0848,-0.091 2.1565,-0.19968 3.2413,-0.29065 15.39,-1.3696 31.015,-2.9407 46.779,-4.8063 15.922,-1.8736 31.965,-4.0286 48.062,-6.4433 13.582,-2.0319 27.162,-4.2534 40.724,-6.6821 2.7532,-0.50491 5.4578,-1.0013 8.1802,-1.5108 16.983,-3.1812 33.094,-6.6493 48.365,-10.29 17.296,-4.1271 33.51,-8.4938 48.609,-12.995 9.938,-2.9512 19.414,-5.9711 28.431,-8.9803 7.6399,-2.6465 15.232,-5.3947 22.71,-8.2228 17.654,-6.6419 34.84,-13.842 51.5,-21.64 11.64,-22.613 23.669,-45.588 34.514,-68.935 -12.622,3.624 -25.468,7.2775 -38.5,10.904 -3.6155,1.007 -7.2794,2.0226 -10.926,3.0251 z"
+ id="path3561"
+ style="fill:url(#linearGradient3875)" />
+ <path
+ d="m 343.66,-0.50096 c 2.2193,-0.41089 4.4564,-0.83491 6.7242,-1.2543 6.7596,-1.2806 13.634,-2.5914 20.659,-3.9587 7.5938,-1.4876 15.325,-3.0493 23.223,-4.6806 3.9802,-0.81109 7.965,-1.653 12.029,-2.4989 12.131,-2.5468 24.602,-5.2637 37.426,-8.1328 15.759,-3.5362 32.058,-7.3074 48.887,-11.362 16.043,-3.8564 32.564,-7.9569 49.579,-12.315 16.146,-4.1247 32.739,-8.4981 49.773,-13.089 15.198,-4.1078 30.724,-8.4034 46.643,-12.908 0.77254,-0.21613 1.5451,-0.43223 2.3045,-0.66606 15.804,-4.4748 31.971,-9.1635 48.483,-14.053 0.3797,-0.1169 0.7594,-0.23382 1.1214,-0.33761 l -19.143,-20.676 c 0.2395,0.5082 0.5278,1.0079 0.7674,1.5161 -23.296,-24.428 -69.92,-45.278 -111.88,-49.997 -19.338,-2.1783 -39.994,-1.8427 -62.413,0.92504 -16.69,2.0589 -34.353,5.4699 -53.191,10.219 -16.464,4.1405 -33.814,9.2679 -52.184,15.425 7.8381,3.7633 15.478,9.0727 22.931,15.646 1.2939,1.1531 2.614,2.3417 3.9119,3.5742 1.2979,1.2325 2.5912,2.4958 3.8622,3.8031 -0.012,-0.0177 -0.0441,-0.0222 -0.0569,-0.04 -28.247,-17.932 -58.622,-19.938 -89.973,-14.526 9.3924,3.2694 23.242,9.6268 35.603,20.379 1.6889,1.4639 3.3155,3.0287 4.9198,4.6376 0.41208,0.40779 0.81102,0.79786 1.1923,1.2011 -0.012,-0.01769 -0.0309,-0.0045 -0.0441,-0.02217 0,0 -0.012,-0.01769 -0.0309,-0.0045 -10.105,-6.0061 -19.623,-10.334 -29.164,-13.137 -2.0374,-0.60186 -4.084,-1.1421 -6.1444,-1.5898 -3.1256,-0.70044 -6.2609,-1.229 -9.4323,-1.6212 -2.0262,-0.25361 -4.0614,-0.44555 -6.1236,-0.56271 -4.8248,-0.29107 -9.7616,-0.2522 -14.877,0.1383 -1.5609,0.1148 -3.1265,0.26044 -4.7274,0.43231 -2.2279,0.36236 -4.3941,0.73388 -6.5295,1.11 -9.6447,1.7187 -18.003,3.5811 -25.18,5.4456 -3.5886,0.93227 -6.8597,1.8486 -9.8489,2.7754 -1.1876,0.35928 -2.3445,0.72314 -3.4528,1.0785 -3.3117,1.0836 -6.2044,2.1035 -8.6957,3.0727 -3.7281,1.4472 -6.5694,2.7582 -8.5675,3.8006 1.3027,0.35098 2.6974,0.8259 4.1661,1.4378 10.15,4.2169 23.891,14.166 33.591,23.215 l -17.583,-18.98 17.583,18.98 c 0.15354,0.13308 0.28938,0.2793 0.44292,0.41237 0.95142,0.91323 1.8983,1.8573 2.8628,2.7882 -0.23288,-0.1291 -0.43954,-0.17283 -0.65472,-0.31504 l 60.164,64.89 c 0.33972,-0.059824 0.67944,-0.11965 1.05,-0.17492 z"
+ id="path3563"
+ style="fill:url(#linearGradient3877)" />
+ <path
+ d="m 141.76,25.871 c 14.308,-0.86871 30.359,-2.1245 48.242,-3.9432 0.92606,-0.08306 1.8876,-0.19234 2.8313,-0.2885 15.471,-1.594 32.288,-3.5552 50.488,-6.02 15.721,-2.1083 32.439,-4.5725 50.245,-7.4582 15.511,-2.5017 31.888,-5.3162 49.043,-8.4876 l -59.49,-64.569 c -24.736,-13.567 -40.821,-16.794 -59.841,-16.547 -5.1755,0.16099 -10.523,0.42238 -15.982,0.79335 -16.711,1.142 -34.469,3.2787 -51.604,6.1064 -16.54,2.7429 -32.435,6.1328 -46.23,9.9134 -8.7714,2.4155 -16.684,4.99 -23.332,7.642 -5.8619,2.3434 -11.266,4.7863 -16.287,7.3018 25.101,24.05 54.589,54.423 71.931,75.557 z"
+ id="path3565"
+ style="fill:url(#linearGradient3879)" />
+ <path
+ d="m 419.27,-109.1 c 1.2979,1.2325 2.5912,2.4958 3.8622,3.8031 -1.271,-1.3073 -2.5643,-2.5706 -3.8622,-3.8031 z"
+ id="path3567"
+ style="fill:#be202e" />
+ <path
+ d="m 419.27,-109.1 c 1.2979,1.2325 2.5912,2.4958 3.8622,3.8031 -1.271,-1.3073 -2.5643,-2.5706 -3.8622,-3.8031 z"
+ id="path3569"
+ style="opacity:0.35;fill:#be202e" />
+ <path
+ d="m 419.27,-109.1 c 1.2979,1.2325 2.5912,2.4958 3.8622,3.8031 -1.271,-1.3073 -2.5643,-2.5706 -3.8622,-3.8031 z"
+ id="path3571"
+ style="fill:url(#linearGradient3881)" />
+ <path
+ d="m 374.86,-93.622 c -0.39438,-0.42091 -0.81102,-0.79787 -1.1923,-1.2011 0.38126,0.4032 0.7802,0.79328 1.1923,1.2011 z"
+ id="path3573"
+ style="fill:#be202e" />
+ <path
+ d="m 374.86,-93.622 c -0.39438,-0.42091 -0.81102,-0.79787 -1.1923,-1.2011 0.38126,0.4032 0.7802,0.79328 1.1923,1.2011 z"
+ id="path3575"
+ style="opacity:0.35;fill:#be202e" />
+ <path
+ d="m 374.86,-93.622 c -0.39438,-0.42091 -0.81102,-0.79787 -1.1923,-1.2011 0.38126,0.4032 0.7802,0.79328 1.1923,1.2011 z"
+ id="path3577"
+ style="fill:url(#linearGradient3883)" />
+ <path
+ d="m 374.81,-93.662 c 0,0 -0.012,-0.01769 -0.0309,-0.0045 0,0 0.012,0.01769 0.0309,0.0045 z"
+ id="path3579"
+ style="fill:#be202e" />
+ <path
+ d="m 374.81,-93.662 c 0,0 -0.012,-0.01769 -0.0309,-0.0045 0,0 0.012,0.01769 0.0309,0.0045 z"
+ id="path3581"
+ style="opacity:0.35;fill:#be202e" />
+ <path
+ d="m 374.81,-93.662 c 0,0 -0.012,-0.01769 -0.0309,-0.0045 0,0 0.012,0.01769 0.0309,0.0045 z"
+ id="path3583"
+ style="fill:url(#linearGradient3885)" />
+ <path
+ d="m 697.74,-87.882 c 12.856,-3.8255 25.903,-7.7645 39.192,-11.856 0.1987,-0.06501 0.3797,-0.1169 0.5784,-0.18193 1.8809,-0.57144 3.7485,-1.1606 5.6293,-1.732 8.9497,-2.7671 16.955,-5.3279 35.178,-11.129 -2.3417,-10.966 2.6186,-24.849 9.1692,-39.363 -11.075,9.2259 -18.387,22.082 -20.063,37.399 -28.142,-41.768 -64.174,-69.017 -107.07,-65.115 -3.8322,0.34468 -7.6833,0.92288 -11.624,1.7871 16.438,0.48738 28.367,7.3631 41.449,27.265 0.0441,0.0223 0.101,0.0623 0.1451,0.0846 -0.0441,-0.0223 -0.101,-0.0623 -0.1451,-0.0846 -33.43,-18.78 -55.964,-23.938 -85.227,-21.557 -6.9364,0.56118 -14.25,1.539 -22.182,2.866 43.476,5.8729 71.791,29.037 88.586,63.086 l 0.7758,1.4939 18.367,19.182 c 2.4192,-0.69629 4.8254,-1.4103 7.2492,-2.1374 z"
+ id="path3585"
+ style="fill:url(#linearGradient3887)" />
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>