Preconnect Hints
Checks for preconnect hints to critical third-party origins
Checks for preconnect hints to critical third-party origins
| Rule ID | perf/preconnect |
| Category | Performance |
| Scope | Per-page |
| Severity | info |
| Weight | 4/10 |
Solution
Preconnect establishes early connections to important third-party origins, saving time on DNS lookup, TCP handshake, and TLS negotiation. Add <link rel='preconnect' href='https://example.com'> for CDNs and critical third-party services. Use crossorigin attribute for CORS resources like fonts. Limit preconnects to 2-4 most critical origins to avoid connection congestion.
Enable / Disable
Disable this rule
[rules]
disable = ["perf/preconnect"]
Disable all Performance rules
[rules]
disable = ["perf/*"]
Enable only this rule
[rules]
enable = ["perf/preconnect"]
disable = ["*"]