Prefetch and preconnect hints: when they help
Short answer: `preconnect` helps early connections to critical third-party origins; `prefetch` guesses next pages—misuse wastes bandwidth.
Use hints sparingly on high-traffic templates; too many hints compete and confuse the browser.
preconnect
- Good for fonts or analytics domains that block rendering.
- Limit to a few origins—each has cost.
dns-prefetch
Cheaper than preconnect—use when full TLS early is unnecessary.
prefetch/prerender
Consider for likely next navigation (e.g., checkout) with privacy care—avoid on metered connections assumptions.
Frequently asked questions
Will hints fix slow servers?
No—they shave connection overhead; TTFB still depends on origin work.
Should plugins auto-inject hints?
Audit output—duplicates and wrong origins happen.