Preload, preconnect and prefetch: resource hints explained

Resource hints explained: preload, preconnect, dns-prefetch, prefetch and fetchpriority, when to use each, common mistakes and how to add them in WordPress.

Usman Muhammad UsmanUpdated October 13, 2026
Preload, preconnect and prefetch: resource hints explained

Resource hints are small instructions in your HTML that tell the browser what it will need soon, so it can start work earlier. Used well, they shave valuable time off loading the most important content. Used badly, they waste bandwidth and slow down what matters. Here is what each hint does and when I use it.

Why resource hints help

Browsers discover resources as they read HTML and CSS. Some important files, such as a hero background image defined in CSS or a font referenced in a stylesheet, are discovered late. Connections to other domains also take time to set up.

Resource hints let you tell the browser about these needs upfront. The browser can then fetch critical files earlier or prepare connections in advance, reducing delays for the content visitors see first.

Preload

Preload tells the browser to download a specific resource early with high priority, because it will be needed for the current page. Common uses are the main web font, a hero image defined in CSS and critical scripts or stylesheets discovered late.

Use preload sparingly. Every preloaded file competes for bandwidth with other important resources. Preload only one or two critical items, and make sure they are actually used on the page, or the browser warns about unused preloads.

Resource hints
HintWhat it doesUse for
preloadFetch now, high priorityMain font, CSS hero image
preconnectOpen connection earlyCritical third-party domain
dns-prefetchDNS lookup onlyLater third-party domains
prefetchFetch for next pageClear next steps
fetchpriorityRelative importanceLCP image high

Preconnect

Preconnect tells the browser to set up a connection to another domain early, including DNS lookup, TCP connection and TLS handshake. When the page later requests a file from that domain, the connection is ready.

Use preconnect for third-party domains that serve critical resources early in the page, such as a font provider or image CDN. Limit it to two or three domains; each connection uses resources, and unused connections are closed after a short time.

DNS prefetch

DNS prefetch performs only the DNS lookup for a domain, which is cheaper than a full preconnect. It suits domains that will be used later in the page, such as analytics or embedded widgets, where a full connection is not urgent.

Some sites use dns-prefetch as a fallback alongside preconnect. It is low risk, but adding it for dozens of domains provides little benefit.

Prefetch

Prefetch downloads resources likely to be needed for the next page, at low priority, when the browser is idle. For example, prefetching the next page in a checkout flow or a commonly visited page.

Prefetching wastes data if visitors do not go to that page, which matters on mobile. Use it for clear next steps only. Newer approaches such as the Speculation Rules API, which WordPress has begun to support, can prefetch or prerender likely next pages more intelligently.

Fetch priority

The fetchpriority attribute tells the browser how important a resource is relative to others of the same type. Setting fetchpriority high on the LCP image helps it load sooner; setting it low on less important images frees bandwidth.

WordPress adds fetchpriority high to the likely LCP image automatically in many cases. Check that the right image receives it and that it is not lazy-loaded. See how to improve LCP.

Preloading fonts correctly

Fonts are a common preload target because they are referenced inside CSS and discovered late. Preload the font file used for above-the-fold text, with the correct type and the crossorigin attribute, which fonts require even on the same domain.

Preloading every font weight is a common mistake that delays the hero image and other critical resources. See loading web fonts without slowing your site.

Preloading hero images

If the hero image is a CSS background, the browser finds it only after downloading and parsing the CSS. Preloading it can improve LCP significantly. For responsive images, use imagesrcset and imagesizes attributes on the preload so the right size is chosen.

A simpler solution is to use a regular image element with fetchpriority high instead of a CSS background, which the browser discovers immediately.

Adding hints in WordPress

Performance plugins such as WP Rocket, Perfmatters and LiteSpeed Cache let you add preload, preconnect and prefetch hints without code. WordPress also provides a filter for resource hints that developers can use in a theme or plugin.

Check the page’s HTML head after adding hints to confirm they appear once and correctly. Duplicate or conflicting hints from several plugins are common.

Common mistakes

Preloading too many files, preloading files that are not used, preconnecting to many domains and preloading resources that are already discovered early are the most common mistakes. These can make pages slower, not faster.

Use PageSpeed Insights and the Network panel in DevTools to see whether hints help. If a preload does not improve LCP or causes warnings, remove it.

Getting help

Resource hints are fine-tuning tools that work best after the main speed issues are fixed: hosting, caching, images and scripts. I add and test them as part of my speed optimization service.

For other render improvements, see eliminating render-blocking resources and HTTP/2, HTTP/3 and Brotli.

Key takeaways

  • Preload only one or two critical resources discovered late.
  • Preconnect to two or three critical third-party domains at most.
  • Use fetchpriority high on the LCP image and never lazy-load it.
  • Check that hints actually improve LCP and remove any that do not.

Frequently asked questions

Should I preload all my fonts?

No. Preload only the font used for above-the-fold text.

What is the difference between preload and prefetch?

Preload fetches resources needed for the current page at high priority; prefetch fetches resources for a likely next page at low priority.

Does preconnect help Google Fonts?

Yes, if you load fonts from Google. Self-hosting removes the need.

Can resource hints hurt performance?

Yes, if overused. Too many preloads compete with critical resources.

Does WordPress add resource hints automatically?

WordPress adds some, such as fetchpriority on likely LCP images and dns-prefetch for certain domains.

What is the Speculation Rules API?

A browser feature that lets sites prefetch or prerender likely next pages more intelligently.

Free website audit

Get a free audit of your website

Tell me your URL and I'll send a short, prioritized list of the speed, SEO and security fixes that will make the biggest difference.

  • No obligation, no sales call
  • 5.0 rating on Google and Upwork
  • Reply within one business day
Written by Muhammad UsmanWeb Development Team Lead with 5+ years building WordPress, WooCommerce, Shopify and Wix websites. Experience · Certificates About me

More on Speed & Core Web Vitals

All Speed & Core Web Vitals articles

Have a project in mind?

Tell me what you're building and I'll reply with next steps and an estimate.