filter · HTML filters
Remove quotes (remove_quotes)
- Category:
- HTML
- CoreFilters:
- No
- OptimizeForBandwidth:
- No
- Risk:
- Generally safe
Removes unnecessary quotation marks around HTML attribute values when the value contains no special characters. Saves a few bytes per attribute.
When to use it
- Not in CoreFilters: it runs only when you enable it by name.
- 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 remove_quotes 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 remove_quotesnginx
pagespeed EnableFilters remove_quotes;IIS (pagespeed.config)
pagespeed EnableFilters remove_quotes
Scoping, ForbidFilters and the thresholds filters read:
Choosing filters
.
Live example
Removes quotes around HTML attribute values where they are not required.
Measured on the demo page, original against optimized:
-
HTTP requests
2 → 1 −1
-
Total bytes
3.9 KB → 179 B −95%
-
HTML size
189 B → 179 B −5%
Frequently asked questions
- What does the remove_quotes filter do?
- Removes unnecessary quotation marks around HTML attribute values when the value contains no special characters. Saves a few bytes per attribute.
- Is remove_quotes enabled by default?
- No.
remove_quotesis not in CoreFilters, the default RewriteLevel; it runs only when you enable it by name withEnableFilters. - How do I enable remove_quotes on Apache and nginx?
- Add
ModPagespeedEnableFilters remove_quoteson Apache orpagespeed EnableFilters remove_quotes;on nginx. On IIS, addpagespeed EnableFilters remove_quotesto 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
- convert_meta_tags — Convert meta tags
This page is drawn from the remove_quotes entry on HTML filters. Every filter in one table: PageSpeed filters.