"Fossies" - the Fresh Open Source Software Archive

Member "incubator-pagespeed-mod-" (28 Feb 2020, 2961 Bytes) of package /linux/www/apache_httpd_modules/incubator-pagespeed-mod-

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the incubator-pagespeed-mod- project site itself.



The 'Pedantic' filter is enabled by specifying:

ModPagespeedEnableFilters pedantic
pagespeed EnableFilters pedantic;

in the configuration file.


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.


There are two cases where a type attribute can be added. First, if a <style> tag does not have a type attribute then a type="text/css" attribute will be added to the style tag. Second, if a <script> tag does not have a type attribute then a type="text/javascript" attribute will be added to the script tag.

The expected method of using the pedantic filter is via a query parameter such as: '?ModPagespeedFilters=+pedantic'.

You can see the filter in action at www.modpagespeed.com on this example.


The 'Pedantic' filter will not alter a page with an HTML5 DOCTYPE.


This filter is considered medium risk. It is safe for most pages, but could possibly break scripts by adding text/javascript to a tag if the default mime type is something other than text/javascript.