Time to First Byte
Measures server response time (TTFB)
Measures server response time (TTFB)
| Rule ID | perf/ttfb |
| Category | Performance |
| Scope | Per-page |
| Severity | warning |
| Weight | 7/10 |
Solution
Time to First Byte (TTFB) measures how quickly your server responds. Slow TTFB indicates server/backend issues.
Thresholds (Core Web Vitals):
- Good: < 600ms
- Needs improvement: 600-1000ms
- Poor: > 1000ms
Fixes for slow TTFB:
- Enable server caching (Redis, Varnish, CDN)
- Optimize database queries
- Use CDN for static assets
- Upgrade server resources
- Reduce server-side processing
- Enable HTTP/2 or HTTP/3
- Use edge computing (Cloudflare Workers, Vercel Edge)
Options
This rule supports the following configuration options:
| Option | Type | Default | Description |
|---|---|---|---|
good_threshold | unknown | undefined | Good TTFB in ms |
poor_threshold | unknown | undefined | Poor TTFB in ms |
Configuration Example
squirrel.toml
toml[rules."perf/ttfb"]
good_threshold = undefined
poor_threshold = undefinedEnable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["perf/ttfb"]Disable all Performance rules
squirrel.toml
toml[rules]
disable = ["perf/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["perf/ttfb"]
disable = ["*"]