filter · HTML filters
Convert meta tags (convert_meta_tags)
- Category:
- HTML
- CoreFilters:
- Yes
- OptimizeForBandwidth:
- No
- Risk:
- Generally safe
Reads <meta http-equiv="Content-Type"> and similar tags and adds corresponding HTTP response headers. This helps browsers discover the content type and character encoding earlier in the response. Runs automatically as a CoreFilter.
When to use it
- In CoreFilters, the default RewriteLevel: it runs unless you disable it.
- Risk rating on these docs: Generally safe.
Risks
The
HTML filters
page lists no specific risks for this filter.
If a page misbehaves with it, DisableFilters convert_meta_tags turns it off
for the scope you set it in.
Configuration
Enable it in the module configuration, at server, virtual-host or location scope:
Apache
ModPagespeedEnableFilters convert_meta_tagsnginx
pagespeed EnableFilters convert_meta_tags;IIS (pagespeed.config)
pagespeed EnableFilters convert_meta_tagsIt is on by default under CoreFilters; to turn it off:
ModPagespeedDisableFilters convert_meta_tags # Apache
pagespeed DisableFilters convert_meta_tags; # nginx
pagespeed DisableFilters convert_meta_tags # IIS
Scoping, ForbidFilters and the thresholds filters read:
Choosing filters.
Frequently asked questions
- What does the convert_meta_tags filter do?
- Reads
<meta http-equiv="Content-Type">and similar tags and adds corresponding HTTP response headers. This helps browsers discover the content type and character encoding earlier in the response. Runs automatically as a CoreFilter. - Is convert_meta_tags enabled by default?
- Yes.
convert_meta_tagsis in CoreFilters, the default RewriteLevel, so it runs unless you turn it off withDisableFilters. - How do I turn off convert_meta_tags?
- Add
ModPagespeedDisableFilters convert_meta_tagson Apache orpagespeed DisableFilters convert_meta_tags;on nginx. On IIS, addpagespeed DisableFilters convert_meta_tagsto pagespeed.config.
Related filters
- add_base_tag — Add base tag
- add_head — Add head
- add_ids — Add IDs
- add_instrumentation — Add instrumentation
- collapse_whitespace — Collapse whitespace
- combine_heads — Combine heads
- compute_statistics — Compute HTML statistics
- debug — Debug comments
This page is drawn from the convert_meta_tags entry on HTML filters. Every filter in one table: PageSpeed filters.