Convert Meta Tags

Configuration

The 'Convert Meta Tags' filter is enabled by specifying:

Apache:
ModPagespeedEnableFilters convert_meta_tags
Nginx:
pagespeed EnableFilters convert_meta_tags;

in the configuration file, but it is also enabled automatically by the core filter set.

Description

The 'Convert Meta Tags' filter adds a response header that matches each meta tag with an http-equiv attribute. For example, HTML

<meta http-eqiv="Content-Type" content="text/html; charset=UTF-8">
would add an HTTP header:
Content-Type: text/html; charset=UTF-8
in the response headers.

The original tag is left unchanged.

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.

Risks

This filter is considered minimal risk because at this time, Content-Type is the only http-equiv value that is transformed into an HTTP header. Other http-equiv values have been found to have unexpected semantic implications when transformed to HTTP.