Skip to main content
Checks the total byte weight of the page
Rule IDperf/total-byte-weight
CategoryPerformance
ScopeSite-wide
Severitywarning
Weight6/10

Solution

Reduce total page weight for faster loads on slow connections. Optimize images (use modern formats, compress, serve appropriate sizes). Minify and compress CSS/JS. Remove unused code via tree-shaking. Lazy-load non-critical resources. Target under 1.6MB for mobile users.

Options

This rule supports the following configuration options:
OptionTypeDefaultDescription
warn_threshold_kbunknownundefinedWarning threshold for total page weight in KB
error_threshold_kbunknownundefinedError threshold for total page weight in KB

Configuration Example

squirrel.toml
[rules."perf/total-byte-weight"]
warn_threshold_kb = undefined
error_threshold_kb = undefined

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["perf/total-byte-weight"]

Disable all Performance rules

squirrel.toml
[rules]
disable = ["perf/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["perf/total-byte-weight"]
disable = ["*"]