"Fossies" - the Fresh Open Source Software Archive

Member "incubator-pagespeed-mod-1.14.36.1/html/doc/filter-convert-meta-tags.html" (28 Feb 2020, 2482 Bytes) of package /linux/www/apache_httpd_modules/incubator-pagespeed-mod-1.14.36.1.tar.gz:


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-1.14.36.1.tar.gz project site itself.

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.