Skip to main content

filter · HTML filters

Debug comments (debug)

Category:
HTML
CoreFilters:
No
OptimizeForBandwidth:
No
Risk:
Not rated

Annotates the page with HTML comments that say which filters ran and why a resource was or was not rewritten (for example why an image was not inlined or a stylesheet not combined). Enable it per request with ?PageSpeedFilters=+debug while troubleshooting instead of in the configuration: it exposes internals, enlarges every page, and is not meant for production traffic.

When to use it

  • Not in CoreFilters: it runs only when you enable it by name.

Risks

The HTML filters page lists no specific risks for this filter. If a page misbehaves with it, DisableFilters debug 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 debug

nginx

pagespeed EnableFilters debug;

IIS (pagespeed.config)

pagespeed EnableFilters debug
https://www.example.com/?PageSpeedFilters=+debug

Scoping, ForbidFilters and the thresholds filters read: Choosing filters .

Frequently asked questions

What does the debug filter do?
Annotates the page with HTML comments that say which filters ran and why a resource was or was not rewritten (for example why an image was not inlined or a stylesheet not combined). Enable it per request with ?PageSpeedFilters=+debug while troubleshooting instead of in the configuration: it exposes internals, enlarges every page, and is not meant for production traffic.
Is debug enabled by default?
No. debug is not in CoreFilters, the default RewriteLevel; it runs only when you enable it by name with EnableFilters.
How do I enable debug on Apache and nginx?
Add ModPagespeedEnableFilters debug on Apache or pagespeed EnableFilters debug; on nginx. On IIS, add pagespeed EnableFilters debug to pagespeed.config.

This page is drawn from the debug entry on HTML filters. Every filter in one table: PageSpeed filters.

Search