Skip to main content

filter · HTML filters

Compute HTML statistics (compute_statistics)

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

Computes statistics about the HTML (element counts and sizes) for the admin console. It adds a parsing pass per page and changes nothing in the output; enable it while you need the numbers.

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 compute_statistics 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 compute_statistics

nginx

pagespeed EnableFilters compute_statistics;

IIS (pagespeed.config)

pagespeed EnableFilters compute_statistics

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

Frequently asked questions

What does the compute_statistics filter do?
Computes statistics about the HTML (element counts and sizes) for the admin console. It adds a parsing pass per page and changes nothing in the output; enable it while you need the numbers.
Is compute_statistics enabled by default?
No. compute_statistics is not in CoreFilters, the default RewriteLevel; it runs only when you enable it by name with EnableFilters.
How do I enable compute_statistics on Apache and nginx?
Add ModPagespeedEnableFilters compute_statistics on Apache or pagespeed EnableFilters compute_statistics; on nginx. On IIS, add pagespeed EnableFilters compute_statistics to pagespeed.config.

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

Search