Guide : Resource Hints

How preload, preconnect, dns-prefetch, and prefetch resource hints speed up page loads and améliorer Core Web Vitals, and quand to utiliser chaque un.

Première publication : 2 juil. 2026 · Dernière mise à jour : 3 août 2026 · Advanced
Langues

Resource hints (dns-prefetch, preconnect, preload, prefetch) tell le navigateur to do network fonctionner — DNS lookups, connection setup, or fetching — précédent que it sinon voudrait. dns-prefetch is cheapest (DNS seulement); preconnect fait the complet DNS+TCP+TLS handshake; preload is a mandatory récupérer pour a late-discovered resource the current page nécessite (comme an LCP image or a font in CSS) — but its par défaut priority encore dépend on the resource type, pas automatically "high" (fetchpriority is a separate hint pour que); prefetch is a low-priority speculative récupérer pour a future page. The big échec mode is overuse — preload everything and you've prioritized nothing. And be honest à propos de SEO: per Gary Illyes (Feb 2026), ces hints don't aider Googlebot explorer or index faster; leur valeur is entirely on the real-user side, qui flows into Core Web Vitals, un of several signals Google's ranking systems utiliser — bon scores don't guarantee top rankings.

TL;DR — The principal resource hints formulaire a spectrum of navigateur cost: dns-prefetch (DNS lookup seulement) → preconnect (DNS + TCP + TLS) → preload (a mandatory récupérer of a spécifique, late-discovered resource) → prefetch (lowest-priority speculative récupérer pour a future navigation). modulepreload is preload’s sibling pour JS modules. preload is the seulement un le navigateur is obligated to récupérer — that’s différent from saying it’s automatically élevé priority; par défaut priority encore dépend on the resource type, and fetchpriority is a separate hint pour raising it. The as attribute is requis on preload; crossorigin is requis pour fonts and autre anonymous-mode récupère, or le navigateur downloads the resource twice. Overuse is the dominant échec mode. And per Gary Illyes (Feb 2026), none of ce helps Googlebot — the SEO valeur is entirely indirect, via Core Web Vitals, qui is un of several ranking signals, pas a deterministic un.

Evidence for this claim Preload declares a resource needed for the current navigation and fetches it with the resource's destination semantics. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: preload Evidence for this claim Preconnect asks the browser to establish an early connection to an origin and should be limited to important origins. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: preconnect

A spectrum of navigateur “cost”

The cleanest mental model pour resource hints is to line les up by how beaucoup fonctionner you’re asking le navigateur to do up front:

  1. dns-prefetch — resolve a hostname to an IP. Cheapest.
  2. preconnect — DNS lookup plus the TCP handshake plus TLS negotiation pour HTTPS. A complet ouvrir connection, ready to utiliser.
  3. preload — go en réalité récupérer a spécifique resource, now. Le navigateur doit traiter the récupérer, but que doesn’t automatically faire it élevé priority — plus on que ci-dessous.
  4. modulepreload — preload’s sibling pour JavaScript modules; récupère the module into le navigateur’s module map en utilisant module-script rules plutôt que a generic récupérer.
  5. prefetch — go récupérer a spécifique resource, but at the lowest priority, pour une page the utilisateur hasn’t navigated to yet.

Ils go in un of two places: a <link> element in the <head>, or an HTTP Link réponse header (plus on the header chemin, and 103 Early Hints, ci-dessous). None of ce is the document-level Speculation Rules API — that’s a separate mechanism pour prerendering/prefetching whole navigations, covered in the prefetch section ci-dessous.

dns-prefetch

dns-prefetch performs simplement the DNS lookup pour a cross-origin server ahead of temps — it doesn’t ouvrir a connection. Que rend it the cheapest hint and a sensible par défaut pour the nombreux lower-priority third-party domains une page touches (analytics, tag managers, minor widgets). In my propre Plus grand affichage de contenu guide I faire the practical point que “DNS-prefetch has meilleur prise en charge que preconnect” — so it’s aussi a reasonable fallback pour navigateurs où preconnect isn’t honored.

<link rel="dns-prefetch" href="https://analytics.example.com">

preconnect

preconnect goes plus loin: it opens the whole connection — DNS, TCP, and (pour HTTPS) the TLS handshake — so que by the temps le navigateur nécessite the resource, the pipe is déjà warm. That’s a bigger win que dns-prefetch, but it’s aussi plus expensive to le navigateur, qui is pourquoi it comes with two important caveats:

  • Reserve it pour votre la plupart critical cross-origin connections. A handful (votre font host, votre image CDN, a critical script origin) — pas everything. Google’s Lighthouse “Preconnect to required origins” audit and web.dev les deux warn que unnecessary preconnects delay autre important fonctionner.
  • An unused connection is wasted fonctionner. Navigateurs fermer a connection que isn’t utilisé dans à propos de 10 seconds, so a preconnect to something vous don’t en réalité récupérer soon simplement burns handshake capacity pour nothing.

Pour fonts, preconnect nécessite the crossorigin attribute — fonts are toujours récupéré in anonymous (CORS) mode, and sans it le navigateur opens a second connection anyway, defeating the point.

<link rel="preconnect" href="https://fonts.example.com" crossorigin>

preload

preload is the un le navigateur is obligated to execute — si it processes the tag, it doit commencer the récupérer pour a resource the current page definitely nécessite but voudrait sinon découvrir late. That’s a statement à propos de quand the récupérer starts, pas automatically à propos de priority: the par défaut priority a preloaded resource obtient encore dépend on the resource type and le navigateur (web.dev is explicit que images, Par exemple, stay low priority by par défaut même quand preloaded). Si vous vouloir to en réalité raise a resource’s priority, that’s a separate, explicit hint — fetchpriority — pas something preload fait on its propre. The classic candidates pour preload:

  • Fonts referenced à l’intérieur a CSS fichier — le navigateur doesn’t know the font exists jusqu’à it downloads and parses the CSS, so preload surfaces it précédent.
  • The LCP (hero) image, surtout un définir via CSS or srcset que isn’t a plain early <img> in the HTML.
  • Critical, late-discovered JavaScript or CSS.

Two attributes faire or break it:

  • as is requis. It indique le navigateur ce que type of resource ce is so it peut assign the correct priority and match the cache entry. Omit it and the navigateur treats la requête comme a generic XHR — incorrect priority, and souvent a duplicate download.
  • crossorigin pour fonts — même rule as preconnect; miss it and the font downloads twice.

Plus généralement, a preload seulement obtient reused si the eventual requête matches it: même URL, même as/destination, the même type or media condition, matching crossorigin/credentials mode, and — où ils appliquer — matching integrity and referrerpolicy. Pour a responsive image preload, que aussi signifie en utilisant imagesrcset/imagesizes que mirror the srcset/sizes le navigateur voudrait en réalité pick, pas a unique unconditional fallback URL. Obtenir quelconque of ces out of sync and le navigateur soit can’t reuse the preload (duplicate récupérer) or récupère the incorrect candidate.

Pour the LCP image specifically, Google’s current recommendation is to pair preload with fetchpriority="high" so the récupérer starts alongside the stylesheet. Ce is the combo I décrire in my LCP guide aussi — fetchpriority="high" obtient the image earliest, and preloading is a strong second signal, utile parce que as I remarque là, “Early Hints don’t fonctionner on tout navigateurs, so vous may aussi vouloir to preload the image.”

<!-- LCP image -->
<link rel="preload" fetchpriority="high" as="image" href="/hero.webp" type="image/webp">

<!-- Font in CSS -->
<link rel="preload" as="font" type="font/woff2" href="/fonts/inter.woff2" crossorigin>

The overuse warning s’applique hardest ici: si everything is preloaded at élevé priority, effectively nothing is. web.dev is explicit que excessive preloads causer bandwidth contention, and it hits hardest on slow networks. Preload the two or three genuinely late-discovered, genuinely critical resources — aucun plus.

modulepreload

modulepreload is preload’s counterpart pour JavaScript modules. Au lieu de a generic resource récupérer, it uses module-script récupérer rules and puts le résultat straight into le navigateur’s module map — so quand the module is plus tard imported, le navigateur déjà has it. Selon le navigateur, it may aussi go ahead and récupérer the module’s static imports. Prise en charge and how deep que dependency-fetching goes les deux vary by navigateur, so tester the réel behavior plutôt que assuming it matches preload.

<link rel="modulepreload" href="/js/app.module.js">

prefetch

prefetch is the odd un out: it’s pas à propos de the current page at tout. It’s a low-priority, speculative récupérer pour a resource a future navigation va probable besoin — the suivant step in a checkout, the article a utilisateur is à propos de to click. Parce que it runs at the lowest priority, it doesn’t steal bandwidth from the current page’s critical resources, and prefetched fichiers land in the HTTP cache (si they’re cacheable) ready pour the suivant navigation.

The trade-off: si the utilisateur jamais goes là, you’ve spent bytes pour nothing — so appliquer it thoughtfully and éviter it on slow or metered connections.

<link rel="prefetch" href="/checkout/step-2" as="document">

Looking forward, the Speculation Rules API is the modern successor to prefetch pour predicting same-site navigations; web.dev notes it handles cas plain prefetch can’t (comme non-cacheable navigations) and behaves plus consistently à travers origins. prefetch remains utile and plus broadly pris en charge in the meantime.

Preload vs. prefetch vs. preconnect vs. dns-prefetch

HintCe que it faitPriorityNavigateur doit obey?Meilleur pour
dns-prefetchDNS lookup seulementSuggestionNombreux lower-priority third-party domains
preconnectDNS + TCP + TLS (complet connection)SuggestionVotre few la plupart critical cross-origin origins
preloadRécupérer a spécifique resourceResource/browser-dependent — pas automatically élevé; pair with fetchpriority to raise itYes, si processedLate-discovered critical resources on ce page
modulepreloadRécupérer a JS module into the module mapResource/browser-dependentYes, si processedLate-discovered ES modules ce page nécessite
prefetchRécupérer a spécifique resource, lowest priorityLowestSuggestionResources pour a probable future navigation

Resource hints and Core Web Vitals

Here’s the partie SEOs en réalité care à propos de — qui hint moves qui metric:

  • dns-prefetch / preconnect shave connection latency, qui montre up as a faster commencer to chargement votre critical resources — feeding LCP and, avant it, FCP.
  • preload acts on LCP and FCP la plupart directement by starting the récupérer of the LCP image or a render-critical font/stylesheet précédent.
  • prefetch doesn’t touch the current page’s Core Web Vitals at tout — it improves the suivant page’s LCP/FCP by having its resources déjà mis en cache.

None of ces directement affecter INP or CLS, though getting fonts in précédent (via preload) peut indirectly reduce layout shift from font swaps — that’s really a font chargement topic, and ressources qui bloquent le rendu is the sibling article on the fetch-order side of the même problem.

Do resource hints aider Google explorer or index my site?

Aucun — and ce is the unique la plupart important nuance to obtenir correct, parce que la plupart content on ce topic is vague à propos de it.

In a February 2026 Search Off the Record episode, Google’s Gary Illyes explained pourquoi Googlebot largely ignores ces hints: ils solve navigateur and network latency problems que Google’s propre exploration infrastructure doesn’t have. As reported by Moteur de recherche Journal, Illyes said “it’s very utile si vous have comme a crappy internet to do DNS Prefetching Par exemple. In our cas, we don’t besoin to parce que we peut talk very fast to tout the cascading DNS servers.” Jump to quote He made the même point à propos de preload — “Même with preload. Si we ne sont pas synchronous alors we don’t particularly besoin to regarder at preload.” Jump to quote

So the correct causal chain is: resource hints → faster real-user experience → meilleur Core Web Vitals → un of several signals Google’s ranking systems utiliser. Google’s propre page experience documentation is explicit que there’s aucun unique page-experience signal, que Core Web Vitals are utilisé by ranking systems alongside others, and que bon CWV scores don’t guarantee a top ranking — relevance encore wins over page experience. So it’s pas nothing — but resource hints are a UX/performances tactic premier, and leur SEO valeur is entirely downstream and non-deterministic. Don’t sell les internally as “ce helps Google lire lune page.”

Bing, pour ce que it’s worth, has publié aucun hint-specific guidance at tout — its webmaster guidance références site speed generically. Le navigateur-level benefits (faster loads, meilleur vitals) appliquer the même regardless of moteur de recherche, so there’s aucun separate “Bing angle” to optimize pour ici.

Delivering hints over HTTP: the Lien header and 103 Early Hints

Resource hints don’t have to live in votre HTML. Vous pouvez send les as an HTTP Link réponse header — Link: </hero.webp>; rel=preload; as=image — qui is how server- and CDN-level implementations fonctionner. The la plupart interesting version of ce is 103 Early Hints: a preliminary HTTP status que lets an edge (comme Cloudflare) send mis en cache preload/preconnect Link headers avant the origin server has même finished generating the complet réponse — giving le navigateur a head commencer on connections and récupère pendant que it waits. I cover the 103 status itself in my Code d’état HTTPs guide, où I décrire it as letting vous preload resources to aider LCP pour Core Web Vitals.

Erreurs fréquentes

  • Preloading aussi nombreux resources — the cardinal sin; it creates bandwidth contention and peut faire lune page slower overall.
  • Preloading choses le navigateur déjà trouve early — an early <img> in the HTML doesn’t besoin preloading; you’re simplement spending une requête slot.
  • Manquant as on preload — incorrect priority and souvent a double download.
  • Manquant crossorigin on font preload/preconnect — a mismatched cache entry signifie the font downloads twice.
  • Stale, unused preconnect tags — left behind après vous supprimé the third-party script ils were pour, holding connections ouvrir pour 10 seconds avant le navigateur donne up.
  • Ignoring the cost au-delà votre propre page — unused hints don’t simplement waste votre propre bandwidth; ils consume sockets and server/third-party capacity, and dns-prefetch/preconnect peut reveal probable destinations to network observers. Navigateurs may aussi ignore, cancel, or limite hints sous Save-Data, low-power, or prise en charge constraints — prefetch in particulier is treated as optional and skipped pour reduced-data utilisateurs, so don’t assume a hint vous shipped is en réalité running pour every visitor.
Evidence for this claim Unused preconnects and fetch hints can consume sockets, bandwidth, CPU, memory and server/third-party capacity, reveal likely destinations or trigger privacy-sensitive network activity; browsers may ignore, cancel or limit hints under settings, support or data-saving constraints. Scope: future-resource speculation Confidence: high · Verified: Prefetching, prerendering, and service worker precaching

Comment tester and audit

  • Lighthouse / PageSpeed Insights — the “Preconnect to required origins” audit flags manquant preconnects on clé requêtes; treat it as a prompt to ajouter a targeted un, pas to carpet-bomb.
  • Chrome DevTools → Network panel — the Priority column montre ce que the navigateur en réalité prioritized, and vous pouvez spot preloaded resources fetching twice (the as/crossorigin bugs).
  • Vérifier pour unused preconnects — si a preconnected origin jamais apparaît as an réel requête, supprimer the hint.

Pour the metrics ces tout feed, voir Core Web Vitals and Plus grand affichage de contenu; the web performances outils article covers the measurement stack in depth.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.