Total Page Weight
Checks the total byte weight of the page
Checks the total byte weight of the page
| Rule ID | perf/total-byte-weight |
| Category | Performance |
| Scope | Site-wide |
| Severity | warning |
| Weight | 6/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:
| Option | Type | Default | Description |
|---|---|---|---|
warn_threshold_kb | unknown | undefined | Warning threshold for total page weight in KB |
error_threshold_kb | unknown | undefined | Error threshold for total page weight in KB |
Configuration Example
squirrel.toml
toml[rules."perf/total-byte-weight"]
warn_threshold_kb = undefined
error_threshold_kb = undefinedEnable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["perf/total-byte-weight"]Disable all Performance rules
squirrel.toml
toml[rules]
disable = ["perf/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["perf/total-byte-weight"]
disable = ["*"]