Using preload, preconnect, and prefetch resource hints can improve your website’s performance by reducing page load times. This post covers what each of these resource hints does, how to implement them on your WordPress website, when it’s beneficial to use them, and the potential pitfalls of relying on too many resource hints.
Web browsers are limited in what they can do at once.
To understand how browser resource hints work, it helps to know that browsers have limited processing power. While modern browsers are capable and multi-threaded under the hood, the main thread (which is responsible for rendering your website) can only do one task at a time.
When a browser loads your website, it has to complete a number of tasks: downloading resources, parsing HTML, loading stylesheets, executing JavaScript, and more. The order and timing of these tasks affect how quickly your website is displayed.
Browser resource hints help the browser prioritise important tasks, so the most critical parts of your site load faster. By guiding the browser with hints like preload, preconnect, or prefetch, you can improve page load times and perceived performance.
Instructing the browser using resource hints
Resource hints are placed in the head section of the HTML document. They provide the browser with early information about resources that are likely to be needed soon, allowing it to optimize loading behaviour.
Common resource hints include dns-prefetch, preconnect, prefetch, and preload, each serving a different purpose in improving performance.
Preconnect allows the browser to establish early connections to external domains, reducing latency for critical third-party assets.
Prefetch is used to fetch resources that might be needed for future navigation, such as the next page in a multi-page article or a script for a modal that hasn’t been triggered yet (this helps the browser load those resources instantly when required).
Preload can be used to load essential assets like fonts or hero images ahead of time. Using these hints strategically can lead to faster page rendering and an overall smoother user experience.
Browser hints are all written in HTML, and they have accompanying attributes which define the type, purpose, and behaviour of the hinted resource, allowing the browser to handle it appropriately during the loading process.
Prefetch
Load a resource now that will be needed in the future.
What the prefetch resource hints does
Prefetch is a resource hint that tells the browser to fetch a resource in the background that might be needed in the near future, such as during a subsequent page navigation or user interaction. It’s a low-priority fetch, meaning it won’t block the current page load or consume bandwidth needed for more urgent assets.
It helps reduce perceived latency when the user eventually requests the resource, because it’s already in the browser’s cache.
When you might use the the prefetch resource hint
Suppose you have a blog post with a “Next Article” link at the bottom. You can use prefetch to load the HTML of the next page in advance, so if the user clicks the link, the transition feels instant.
Prefetch HTML example
<link rel="prefetch" href="/article-2.html" as="document">
Prefetch attributes and what they do
Attribute 8077_14ba4d-eb> | Required 8077_996eb8-8c> | Description 8077_b5e979-11> |
rel=”prefetch” 8077_666680-d5> | ✅ 8077_cf9e44-65> | Indicates that the browser should prefetch the resource. 8077_d0c6d1-47> |
href=”/article-2.html” 8077_bf6747-d7> | ✅ 8077_6b0aba-90> | Specifies the URL of the resource you want to prefetch. 8077_f94629-93> |
as=”document” 8077_25da81-ef> | ⚠️ 8077_993ba2-51> | Specifies the type of resource being prefetched. Helps the browser apply correct content policies, prioritisation, and caching. 8077_e43766-80> |
type 8077_a8940c-e4> | Optional 8077_e810ee-19> | Specifies the MIME type of the resource. Useful for certain resource types like fonts or scripts. 8077_da984d-37> |
crossorigin 8077_3b4431-b5> | Optional 8077_d3964d-3c> | Needed if the resource is on a different origin and uses CORS. Helps the browser handle credentials and headers correctly. 8077_eeb1a0-ac> |
Common as values for prefetch
- document – For full HTML pages.
- script – For JavaScript files.
- style – For CSS files.
- image – For images.
- font – For web fonts.
DNS prefetch
Look up the DNS of a domain early.
What the DNS prefetch resource hints does
Dns-prefetch is a resource hint that tells the browser to resolve the DNS of a domain early, before any actual resource requests to that domain are made. This helps reduce latency by preemptively performing the DNS lookup, which is often one of the first steps in establishing a connection to an external resource.
Unlike other resource hints, dns-prefetch does not download or connect to a specific file — it simply performs the DNS resolution so the domain is ready when needed.
When you might use the the DNS prefetch resource hint
Let’s say your website includes fonts or scripts from a third-party CDN (like Google Fonts or a JavaScript library from a CDN). The browser won’t normally resolve that domain’s DNS until it encounters the actual request. By adding a dns-prefetch hint, you tell the browser to start the DNS lookup early.
Example DNS prefetch HTML
<link rel="dns-prefetch" href="//fonts.googleapis.com">
DNS prefetch attributes and what they do
Attribute 8077_02aad7-dd> | Required 8077_fb85db-56> | Description 8077_833667-03> |
rel=”dns-prefetch” 8077_11b75d-07> | ✅ 8077_0d8869-21> | Tells the browser to perform a DNS resolution for the given domain. 8077_5137f1-8f> |
href=”//fonts.googleapis.com” 8077_cae0cf-b8> | ✅ 8077_0c4498-ac> | The domain to resolve. The double slash omits the scheme (http/https) for flexibility. Must be a domain only, not a full URL. 8077_99b11c-f7> |
Note: You only provide the domain (e.g. //example.com), not a full path or file.
Important notes about DNS prefetch
You can use dns-prefetch even before any actual resources from that domain are requested.
It’s most useful for external third-party domains (CDNs, analytics, ad networks, etc.).
Some browsers support dns-prefetch even when it’s included within
<meta http-equiv="x-dns-prefetch-control" content="on">
but this is rarely necessary with modern browsers.
Preconnect
Initiate early connections to an external resource.
What the preconnect resource hints does
preconnect is a resource hint that tells the browser to initiate early connections to a specified origin. This includes DNS resolution, TCP handshake, and, for HTTPS, TLS negotiation—all before any actual resource requests are made.
This can significantly reduce latency, especially for critical third-party resources, by preparing the connection ahead of time.
When you might use the the preconnect resource hint
Imagine your website uses a font from Google Fonts. Normally, the browser waits until it parses the
<link>
o the stylesheet before beginning the connection to fonts.googleapis.com. With preconnect, you tell the browser to set up that connection immediately, so when the font file is needed, its already partway loaded.
Example preconnect HTML
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
Preconnect attributes and what they do
Attribute 8077_8ff902-3a> | Required 8077_f11ad4-8c> | Description 8077_5e72fd-ef> |
rel=”preconnect” 8077_91d0ee-c3> | ✅ 8077_8c75aa-f3> | Tells the browser to initiate an early connection to the specified origin. 8077_516486-15> |
href=”https://fonts.googleapis.com” 8077_283e32-57> | ✅ 8077_b1a731-d3> | The full origin (protocol + domain) to preconnect to. This must not include a path or file. 8077_815f36-14> |
crossorigin 8077_edddb1-12> | Optional/required 8077_72fe2d-8f> | Optional but recommended for cross-origin requests. Required when preconnecting to a resource on another domain that requires CORS (e.g., fonts, APIs). Helps the browser handle credentials and apply proper security policies. Use crossorigin (no value) or crossorigin=”anonymous” depending on your needs. 8077_a9c3e4-ac> |
Important: You must include the full origin, including https://, not just //example.com.
How preconnect is different from dns-prefetch
Feature 8077_4456f1-70> | dns-prefetch 8077_c35bc9-21> | preconnect 8077_150504-a2> |
Resolves DNS 8077_3ed5ae-05> | ✅ 8077_de7b6f-59> | ✅ 8077_573b20-ee> |
Opens TCP connection 8077_15a18c-4e> | ❌ 8077_bfe054-1e> | ✅ 8077_e4cb3c-a8> |
Initiates TLS (HTTPS) handshake 8077_30159b-21> | ❌ 8077_f396b5-53> | ✅ 8077_ab28e0-ea> |
Faster but more resource-intensive 8077_134f3a-e7> | ❌ 8077_54fd09-93> | ✅ 8077_7d0660-31> |
Lightweight, low priority 8077_7146ce-25> | ✅ 8077_93b591-37> | ❌ 8077_397c6d-c6> |
Preload
Load a resource early.
What the preload resource hint does
Preload is a powerful resource hint that tells the browser to load a specific resource early, as soon as possible during page load—before it would normally be discovered. Unlike prefetch, which is low priority and speculative, preload is high priority and intentional.
This is particularly useful for critical assets like fonts, hero images, CSS, or scripts that are needed to render the page properly and quickly.
When you might use the preload resource hint
Let’s say your homepage has a large hero image at the top of the page, which is the Largest Contentful Paint (LCP) element. Normally, the browser may discover this image only after parsing the HTML or CSS, which delays its loading.
To improve performance and lower your LCP time, you can use preload to tell the browser to fetch the hero image immediately, even before it encounters the tag. This ensures the image is downloaded earlier in the critical rendering path, leading to a faster visual load.
Example preload HTML
<link rel="preload" as="image" href="/images/hero-banner.webp" type="image/webp" fetchpriority="high">
Best practice tips for LCP image preloading
Make sure the image you’re preloading is actually the LCP element (usually the largest visible image above the fold).
Use a matching src in the
<img>
tag later in the HTML, otherwise the browser may treat it as a separate resource and re-download it.
Combine with the fetchpriority=”high” attribute on the
<img>
tag itself for full effect:
<img src="/images/hero-banner.jpg" alt="Welcome to our site" fetchpriority="high" width="1200" height="600">
Preload attributes and what they do
Attribute 8077_ac5205-f1> | Required 8077_50b576-c9> | Description 8077_6788ed-ba> |
rel=”preload” 8077_2e7345-24> | ✅ 8077_459360-8e> | Tells the browser to preload the specified resource early in the page load. 8077_ab84ba-75> |
href=”/fonts/custom-font.woff2″ 8077_a56828-d9> | ✅ 8077_b312a5-41> | URL of the resource to preload. Should be an asset that will definitely be used on the page. 8077_7d7796-96> |
as=”font” 8077_72473e-bc> | ✅ 8077_a14429-bc> | Specifies the resource type, so the browser can handle it properly (e.g., prioritisation, cache policy, security rules). 8077_653d02-8f> |
type=”font/woff2″ 8077_56e567-84> | Optional 8077_1cae07-4d> | Helps the browser confirm the resource MIME type. Required for some fonts and scripts. 8077_030cf0-cd> |
crossorigin 8077_f73806-59> | Optional/Required 8077_3848c4-91> | Optional but required for CORS-restricted resources like fonts Use crossorigin (or crossorigin=”anonymous”) if the resource is hosted on another origin or if the type (like fonts) demands it. 8077_367614-52> |
Common preload as values
as Value 8077_54987f-62> | Use For 8077_aeaa71-78> |
script 8077_6e7dfb-61> | JavaScript files 8077_e7e48d-94> |
style 8077_fa047b-3f> | CSS stylesheets 8077_83f689-0d> |
image 8077_cc26fe-6a> | Images (e.g., hero images) 8077_2ede7b-0d> |
font 8077_5123ae-a2> | Web fonts (e.g., .woff2, .woff) 8077_b86226-46> |
fetch 8077_8ea9a6-59> | API calls or custom fetch requests 8077_08578e-92> |
document 8077_9bce3e-78> | HTML pages for iframes 8077_456f91-87> |
audio / video 8077_c7bb34-99> | Media files 8077_6d1fd5-43> |
Important notes about the preload browser hint
preload does not apply the resource, it only downloads it early. You must still reference the resource normally (e.g., link to the font in CSS).
Preloading a resource that’s never used wastes bandwidth, so only preload resources guaranteed to be needed.
Using the correct as value is essential, if it’s missing or incorrect, the preload may be ignored or generate a browser warning.
Be cautious when using the preload browser hint
While preload is a powerful tool for improving performance, especially for critical resources like fonts or LCP images, it should be used strategically, not excessively. Overusing preload can have the opposite effect and actually harm your site’s performance.
Why you shouldn’t preload everything
Preloading too many resources tells the browser to load them all early, regardless of whether they’re actually needed right away. This can lead to:
Bandwidth waste – Resources that are preloaded but never used still consume bandwidth.
Slower critical rendering – The browser may be forced to fetch less important resources ahead of truly critical ones, delaying First Contentful Paint (FCP) or LCP.
Network congestion – Especially on slower connections, preloading many resources can overwhelm the browser’s limited number of parallel requests.
Increased CPU usage – Processing many preloaded resources (scripts, styles, fonts) can increase parsing and memory overhead.
The goal is not to preload everything, but to only preload what will speed up rendering of above-the-fold content.
Preload best practices
To get the most out of preload without hurting performance:
- Only preload resources that are definitely used on the current page (e.g. hero image, main font, essential CSS or JS).
- Match preloaded assets exactly with those later referenced (same path, file, and protocol).
- Avoid preloading resources used later in the page or during user interaction (use prefetch or lazy loading instead).
- Use the correct as value and MIME type, especially for fonts and images.
- Test on slower networks to see the real impact of your preloads on time to first render.
How to know what to preload
Here’s how you can identify which resources are good candidates for preloading:
Use browser DevTools
Open Chrome DevTools → Performance tab → Record a page load.

Look for resources that block rendering or are delayed but used early (e.g., hero images, fonts).
Audit with Lighthouse, PageSpeed Insights or Debug bear’s page speed test and browser hints resource validator tool. These tools will suggest preloading key requests — especially LCP images and fonts. They may flag fonts or large images that are render-blocking.
Check Largest Contentful Paint (LCP) source:
If your LCP is an image or background image, preloading it can have a big performance payoff.
You can see this in a pagespeed insights report by expanding the Largest Contentful Paint section:

Or in the LCP section of Debug Bear’s Page Speed Test:

Only preload what’s important on the initial page load — don’t preload resources users might not request.
Use preload as a precision tool, not a blunt instrument. A few well-chosen preload hints can dramatically improve loading speed, but overdoing it leads to bloated performance, wasted resources, and slower user experiences. Focus on what’s above the fold, what blocks rendering, and what contributes directly to Core Web Vitals like LCP and FCP.
Validating your browser hints
There are tools designed specifically to check resource hints, such as Debug Bear’s Browser Resource Hint Validator.
It’s a very good idea to use tools of this nature to check that your browser hints are valid, and that you’re not over using these.
It’s very tempting to see something positive taking place through the use of browser hints, such as your LCP metric improving, then to think “Excellent! What else can I browser hint?”. This doesn’t always have the desired effect, as the overuse of browser hints can be worse for performance than not using them at all.
If you think of browser hints managing a queue in a shop, this might help. Organising the queue helps the cashier deal with customers at an effective rate. This is the equivalent to a good use of browser hints. On the other hand if the queue in the shop turns in to a free for all, and five customers try and checkout and pay all at the same time, that doesn’t really help the cashier, or the efficiency of the queue.
Over using browser hints can result in the browser being told to do too much at the beginning of the page loading process. The balance between loading enough and loading too much can be a fine line to tread, so using tools to validate your browser hints is a good idea.
Using browser hints in WordPress
How you use browser hints in WordPress can be very varied according to your site, what it is you’d like to browser hint, and if you’d like to do this for the whole page or just one page.
Manually deploying global browser hints in WordPress
Using global site wide browser hints in WordPress can be fairly straight forward.
Let’s say your site uses Google fonts, which load externally from https://fonts.googleapis.com . As your site uses these fonts on every page, a global DNS prefectch to //fonts.googleapis.com makes sense.
What this will do will tell the browser to carry out a DNS lookup on fonts.googleapis.com early in the page load. While this won’t actually load a resource, it will look up DNS for fonts.googleapis.com . The effect of this, is that the DNS lookup has already been carried out when it comes to actually loading the fonts. The time it takes to load the fonts from fonts.googleapis.com is reduced due to this.
Most code snippet plugins allow you to add directives to the head section of all pages on your website. You’d just need to install and activate a plugin of this nature, then add the DNS prefetch directive to the head section using:
<link rel="dns-prefetch" href="//fonts.googleapis.com">
Using plugins to add global browser hints in WordPress.
There are magical zero config plugins such as Pre* Party Resource Hints.
Plugins like this will detect global preloading, automatically bring this in to effect, and provide you with an interface that allows you to disable and enabled the browser hints that it’s added:

There are other plugins such as WPcode and Code Snippets that you can use to manually add global browser hints to the site as a whole.
While these plugins are all well and good, they don’t allow for per page browser resource hints. As your LCP image is likely to vary between pages, this can cause a bit of a problem.
Optimising LCP images in WordPress using browser hints
LCP is an important metric because it’s part of what’s used to assess your website’s Core Web Vitals. These metrics are a ranking factor, and failing to pass them can negatively affect your site’s position in search results.
LCP stands for Largest Contentful Paint. It measures the time it takes for the largest visible element above the fold (the part of the page displayed in the browser before scrolling) to be fully rendered.
On many WordPress sites, this largest element is often a large image at the top of the page (commonly a hero image or banner). Since this image often determines the LCP timing, optimising how quickly it loads can improve your Core Web Vitals score.
One way to do this is by using browser hints to preload the LCP image. This tells the browser to start downloading the image early in the render process—before it would normally be requested. Because the image is fetched sooner, it’s ready to display by the time the LCP is measured, reducing the delay.
Example of a preload browser hint:
<link rel="preload" as="image" href="/images/hero-banner.webp" type="image/webp" fetchpriority="high">
Since your LCP image will likely vary between pages, you’ll need a plugin that allows per-page
<head>
modifications.
The Header and Footer Script Adder plugin can be used to insert both global and page-specific browser hints. It adds a section to the bottom of each page in the WordPress editor where you can manually define the preload tags.

When optimising for LCP using the method outlined above, it’s important to:
- Ensure you have a mobile-optimised version of the LCP image, and that this is the one loaded on mobile devices.
- Use the preload browser hint to call the mobile-optimised image.
- Validate that the preload hint is working as intended by using tools such as DebugBear’s Browser Resource Hint Validator.
Why it’s important to optimise LCP for mobile as a priority
When improving LCP, it’s tempting to focus on desktop performance first—but in reality, mobile optimisation should be the priority. Here’s why:
Google prioritises mobile in rankings
Google’s mobile-first indexing means that the mobile version of your site is the primary version Google uses for ranking and indexing. If your mobile LCP is poor, it can directly hurt your search performance, even if your desktop score is excellent.
Mobile devices are less powerful
While desktop machines can load and render pages quickly, most mobile devices (especially older models) have less processing power, slower storage, and possible slower network connections. This makes the largest visible element on the page take longer to load and display, which can drag down your LCP score.
Lab testing can’t perfectly simulate real devices
Even though tools like Lighthouse can simulate a mobile connection and device profile, these are still approximations. Real-world mobile users may experience slower speeds and higher latency than any lab simulation shows.
Device-specific preloads aren’t practical
You can’t easily set up different preload hints for desktop and mobile users. Since preload hints are placed in the page’s before the browser knows the visitor’s screen size, you have to choose one version to prioritise. In most cases, choosing the mobile-optimised image will deliver better results for the majority of users.
It’s easier to pass LCP on desktop
Because desktops generally have faster CPUs, more RAM, and better network connections, they’ll often pass the LCP Core Web Vital without extra effort. Mobile, however, usually needs more optimisation to meet Google’s recommended 2.5-second threshold.
Optimising for mobile LCP ensures you’re addressing the most challenging performance scenario first. If you pass on mobile, you’ll almost certainly pass on desktop—giving your site the best chance to perform well in both search rankings and user experience.
WordPress Resource Hints and LCP Optimisation – FAQ
What are browser resource hints?
Browser resource hints are HTML directives placed in a page’s section to help the browser load important resources sooner. Common examples include:
dns-prefetch – Resolves a domain’s DNS early.
preconnect – Opens a network connection to an external server in advance.
prefetch – Downloads resources that may be needed soon.
preload – Downloads a critical resource as soon as possible.
What’s the difference between preload, preconnect, prefetch, and DNS-prefetch?
DNS-prefetch – Only resolves the domain’s DNS.
Preconnect – Resolves DNS, opens TCP, and negotiates TLS.
Prefetch – Fetches low-priority resources for later use.
Preload – Immediately downloads high-priority resources for the current page.
3. How does preload help with LCP in WordPress?
Preloading the Largest Contentful Paint (LCP) image tells the browser to fetch it early in the page load, so it’s ready by the time the LCP measurement occurs. This can reduce LCP times and improve Core Web Vitals scores.
4. Why should I optimise LCP for mobile first?
Google’s mobile-first indexing prioritises your mobile version for ranking.
Mobile devices often have less processing power and slower connections.
Lab simulations can’t perfectly match real mobile conditions.
You can’t easily preload different images for mobile vs desktop in one request.
Passing LCP on mobile usually means you’ll pass it on desktop too.
How do I preload an LCP image in WordPress?
Use a plugin that allows per-page modifications (e.g., Header and Footer Script Adder). Then add:
<link rel="preload" as="image" href="/images/hero-banner.webp" type="image/webp" fetchpriority="high">
Ensure you use the same file path in the tag to avoid duplicate downloads.
6. Can I preload different images for mobile and desktop?
Not reliably. Preload hints are added before the browser knows the screen size, so it’s best to preload the mobile-optimised image—this benefits both mobile users and Google rankings.
7. What’s the risk of using too many resource hints?
Overusing resource hints can hurt performance by:
Wasting bandwidth on unused assets.
Delaying more important resources.
Increasing CPU and memory usage.
Always validate your hints with tools like DebugBear’s Browser Resource Hint Validator.
8. When should I use prefetch instead of preload?
Use prefetch for resources that will be needed soon but not immediately (e.g., the next page in a series). Use preload only for assets needed right away in the current page view.
9. How do I add global resource hints in WordPress?
For resources used across the whole site (e.g., Google Fonts), add hints globally using:
<link rel="dns-prefetch" href="//fonts.googleapis.com">
You can do this via a code snippet plugin (WPCode, Code Snippets) or an automated tool like Pre* Party Resource Hints.
10. What’s the best way to decide what to preload?
Audit with Chrome DevTools, Lighthouse, or PageSpeed Insights.
Focus on assets that block rendering and affect above-the-fold content.
Start small—only preload resources guaranteed to be used on that page.