in the configuration file.
Note: New feature as of 188.8.131.52
inline scripts, and the latter rewrites only external ones.
New Minification Parser
We introduced a new minification parser in version 184.108.40.206 that improves on some of the shortcomings of the previous parser (for example, correct tokenizing of regular expressions). As of 220.127.116.11, the new parser is used by default, but you can revert back to the old parser with this configuration flag:
pagespeed UseExperimentalJsMinifier off;
Before 18.104.22.168, the old minification parser was used by default. You can enable the new minification parser with:
pagespeed UseExperimentalJsMinifier on;
for canonicalization you'll have to
regenerate your signatures with both
(for the new minifier) and
(for the old minifier) flags.
Douglas Crockford's popular
At present, the filter strips all
<script> blocks (either as the target of the
src attribute, or within the body of the block).
This practice reduces the payload size.
For example, if the HTML document looks like this:
With the following in
/* Inject state into document */ document.write("External " + state); state += 1; // Then update it.
Then PageSpeed will rewrite it into:
And the rewritten file
You can see the filter in action at
www.modpagespeed.com on this
<script> tags is
rewritten. Code fragments that occur elsewhere (for example event handler
declarations in CSS) are not altered.
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
src (as shown in the example above), in hidden
<span> elements in the
This filter is sensitive to
document.getElementsByTagName('script') will not be rewritten.