← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Resource Prefetching

Performance HTML5 Intermediate
debt(d6/e3/b3/t7)
d6 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7), but Lighthouse and Chrome DevTools surface 'preloaded resource not used' warnings, nudging closer to d5/d6. Scoring d6 as a midpoint — specialist tooling catches some cases but misconfigured prefetch is largely invisible.

e3 Effort Remediation debt — work required to fix once spotted

Closest to 'simple parameterised fix' (e3) — adding/removing link rel=prefetch/preload tags or enabling framework route prefetching is a small parameterised change within the head/template layer, per quick_fix.

b3 Burden Structural debt — long-term weight of choosing wrong

Closest to 'localised tax' (b3) — prefetch hints live in the document head or routing layer, applies_to is web only, and rest of codebase is unaffected.

t7 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'serious trap' (t7) — misconception explicitly notes prefetch vs preload semantics are frequently confused, and 'more preloading helps' is the canonical wrong belief that actively harms the critical path.

About DEBT scoring →

Also Known As

preload prefetch preconnect resource hints

TL;DR

dns-prefetch, preconnect, preload, and prefetch hints — fetching critical resources early to reduce perceived load time.

Explanation

dns-prefetch: resolve DNS early (free, use for all external domains). preconnect: DNS+TCP+TLS for 2-3 critical origins. preload (as=font/image): fetch current-page critical resource — high priority, use sparingly for LCP and fonts only. prefetch: speculative next-page resource — low priority, idle time.

Common Misconception

Preloading more always helps — preloading too many competes with the critical path; preload only the LCP image and critical fonts.

Why It Matters

Prefetching trades bandwidth for perceived speed — the browser downloads resources before the user explicitly requests them. Done correctly, navigation feels instant because the next page is already in cache. Done incorrectly, prefetching wastes bandwidth on resources never used, penalises users on metered connections, and can pre-execute tracking or analytics scripts the user did not consent to. The rel=prefetch and rel=preload hints have different semantics and are frequently misapplied.

Common Mistakes

  • Preloading unused resources — browser warning
  • Too many preconnects — CPU cost
  • No as attribute on preload
  • Confusing prefetch (next page) with preload (current page)

Code Examples

✗ Vulnerable
<!-- No hints — font discovered 200ms after CSS -->
✓ Fixed
<link rel="dns-prefetch" href="//analytics.example.com">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preload" href="/hero.avif" as="image">
<link rel="preload" href="/inter.woff2" as="font" crossorigin>

Added 16 Mar 2026
Edited 23 Mar 2026
Views 50
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 1 ping S 0 pings M 0 pings T 0 pings W 0 pings T 1 ping F 0 pings S 3 pings S 1 ping M 1 ping T 2 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 1 ping S 0 pings M 2 pings T 0 pings W
No pings yet today
PetalBot 2
Amazonbot 7 Scrapy 6 Perplexity 4 SEMrush 4 Ahrefs 4 Google 2 Unknown AI 2 Bing 2 ChatGPT 2 PetalBot 2 Claude 1 Meta AI 1
crawler 35 crawler_json 2
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Medium
⚡ Quick Fix
Use Next.js-style route prefetching or vanilla JavaScript to prefetch likely next pages on hover — the browser downloads them in the background so navigation feels instant
📦 Applies To
any HTML5 web
🔗 Prerequisites
🔍 Detection Hints
No link prefetching on predictable navigation paths; DNS not prefetched for third-party origins; no speculation rules for predictable navigation
Auto-detectable: ✗ No lighthouse chrome-devtools
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: Medium Context: File


✓ schema.org compliant