Skip to content

Mirrored documentation

This page is a faithful mirror of the original Apache mod_pagespeed documentation (Apache License 2.0). The upstream project was retired and the modpagespeed.com domain is now operated by an unrelated commercial vendor; we host the original reference so users of nginx-module-pagespeed from GetPageSpeed can rely on a stable copy.

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.