The 'Pedantic' filter is enabled by specifying:
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
<style> tag does not have a
type="text/css" attribute will be added to
style tag. Second, if a
<script> tag does
not have a
type attribute then
The expected method of using the pedantic filter is via a query parameter
such as: '
You can see the filter in action at
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
default mime type is something other than