Your product page may look simple, but the browser has work to do before a shopper sees the hero image: find the image URL, connect to the server, and download the file. Preload and preconnect hints can help it start sooner. Used indiscriminately, though, they can make a phone download resources the shopper does not need.
The practical rule is simple: preload a specific file needed on the current page; preconnect to an external server you know the page will need soon. Start with the most important visible content, then measure whether each hint actually helps.
What preload and preconnect do
Preload tells the browser to fetch a particular resource early, before it might otherwise discover it. It is most useful when a critical file is hidden behind another step—for example, a hero image referenced inside a stylesheet or selected by a page template after the initial HTML arrives.
Preconnect tells the browser to begin setting up a connection to another origin early. That setup can involve a DNS lookup, a network connection, and security negotiation. Preconnect does not download a product image, font, or script by itself.
| Hint | Best use | Main risk |
|---|---|---|
| Preload | A specific, critical file needed on the current page | Downloading an unnecessary file or competing with more important requests |
| Preconnect | An external origin that will serve a critical resource soon | Spending connection time and device resources on an origin the page never uses |
Neither hint fixes an oversized image, a slow server, or a page weighed down by apps and scripts. Treat them as scheduling tools, not substitutes for basic performance work.
Choose resources that matter to the first screen
For most ecommerce pages, the strongest candidate is the Largest Contentful Paint (LCP) image: often a homepage hero, collection banner, or main product photo. LCP measures when the largest visible content element finishes rendering. If the browser discovers that image late, an appropriate preload may help it start the request earlier.
Do not assume the same image is important on every page or screen size. A desktop campaign banner may disappear on mobile. A product page may show a different lead image for a selected variant. Review the actual page template and viewport before adding a hint.
Good candidates for preload
- A late-discovered hero or main product image that appears immediately without scrolling.
- A font file used in prominent first-screen text when that font is important to the initial render and is discovered late.
- Another genuinely critical asset whose request starts late in the network timeline and whose earlier arrival improves rendering.
A product page with a main image already discoverable early in the HTML may not need an image preload. Likewise, a stylesheet linked near the start of the document is generally discovered early without one. Check the request timeline rather than adding hints by habit.
Usually poor candidates for preload
- Below-the-fold product images and recommendation carousels.
- Every image in a gallery when only the first is visible.
- Checkout assets on a product page, in anticipation of a possible later visit.
- Scripts for widgets that load only after a click or consent decision.
Each unnecessary preload consumes bandwidth and can compete with the file you meant to prioritize. That matters most for shoppers on slower connections or limited data plans.
Use preconnect sparingly for critical third-party origins
Preconnect is most useful when an important resource comes from a different origin and the browser would otherwise learn about that origin late. For example, your store might load a first-screen font or a critical product image from a separate domain.
Look at the origin—the scheme, domain, and port—not just the company providing the service. A store can use several domains for fonts, images, analytics, reviews, and payments. Connecting to all of them “just in case” wastes resources.
Start with one or two origins that reliably serve resources needed immediately on that page. A payment provider that is only used during checkout is not a compelling preconnect candidate on every collection page. A review widget far below the fold is unlikely to deserve an early connection either.
If a third-party request is governed by a consent choice, preserve that behavior. A performance hint should not be used to bypass your store’s consent controls; review when the connection begins as part of implementation.
Add hints without creating duplicate downloads
Resource hints are commonly added as link elements in the document head. The important implementation details are the relationship value, the target URL, and—particularly for preload—the resource type. For example, an image preload identifies its resource type with as=”image”.
A preload must match the resource the page will actually request. If the preload targets one URL but the storefront chooses another image size, format, or variant, the browser may download the wrong file as well as the right one. Responsive images need particular care: the selected file can differ by viewport and device capabilities. Test both desktop and mobile requests before rolling an image preload across a template.
Fonts are another common source of mistakes. Font preloads typically need a matching crossorigin setting so the browser can reuse the downloaded file for the subsequent font request. If the request settings do not match, you may see a second download. The same principle applies generally: check the network panel to confirm that a preloaded file is used, rather than assuming the hint worked.
Some ecommerce platforms, themes, or performance apps already add resource hints. Check what your storefront outputs before adding another hint through a theme edit or plugin. Duplicating a hint may add clutter; preloading a different version of the same asset can cost real bandwidth.
Preload versus fetch priority: which should you use?
If the browser already discovers an image early, you may not need preload at all. In that situation, fetchpriority=”high” on the actual image can signal that it deserves more attention among competing requests. Preload is more relevant when discovery itself is late.
The two can be used together when an important image is both discovered late and needs high priority, but more signals are not automatically better. Reserve high priority for a small number of truly critical resources. If you give every product tile, banner, and app asset the same treatment, the browser has less room to make useful trade-offs.
For a first-screen image, also check whether your theme marks it for lazy loading. Lazy loading is valuable for images further down the page, but it can delay an image the shopper needs to see immediately. Fixing that mismatch may be more useful than adding another hint.
A practical workflow for your storefront
- Pick one high-value template. Start with a product page or a heavily visited collection page rather than making site-wide changes.
- Find the visible bottleneck. Use PageSpeed Insights and your browser’s developer tools to identify the LCP element and inspect when its image or font request begins.
- Choose the smallest intervention. If the asset is discovered late, consider preload. If it is already discovered early but competing for attention, consider fetch priority. If a critical asset comes from a late-discovered external origin, consider preconnect.
- Implement at the right scope. Apply a hint only to templates and variants that use that resource. Avoid preloading a homepage banner across every product page.
- Test for waste. In the network panel, look for duplicate requests, unused preloads, and changes in bytes transferred. Check mobile and desktop layouts, including responsive image choices.
- Compare outcomes. Review lab tests before and after, then monitor real-user performance data where available. Pay attention to LCP, but also watch for slower downloads of other important content.
Run comparisons under similar conditions and repeat tests rather than trusting a single score. An apparent improvement in one run may be normal variability. If the hint adds bytes or shifts a delay elsewhere without a consistent benefit, remove it.
Common mistakes that slow ecommerce pages down
Preloading an image shoppers cannot see yet
A collection page might contain dozens of product photos. Preloading them all forces early downloads to compete with the visible banner and first row of products. Keep below-the-fold images on their normal loading path.
Using a site-wide hint for a page-specific asset
A hero image that belongs only to your summer campaign should not be preloaded on product, cart, and checkout pages. Scope hints to the templates—and, where necessary, the conditions—that actually use the asset.
Preconnecting to every app and service
Analytics, chat, reviews, and payment tools may all use separate origins, but not all are critical to the first screen. Prioritize what a shopper needs now, not every service your store might use later.
Ignoring the underlying asset
Fetching an excessively large image earlier does not make it appropriately sized. Before tuning hints, make sure your images are compressed and served at sensible dimensions, your visible images are not inadvertently lazy-loaded, and unnecessary scripts are under control.
Make the next change a measured one
Start with one page template and one suspected bottleneck. Confirm what the browser requests, add only the hint that addresses the delay, and check whether shoppers receive the right asset without extra downloads. That approach gives you a better chance of improving the first impression of your store without spending your customers’ bandwidth on guesses.
Frequently Asked Questions
Should I preload the main product image on every product page?
Not automatically. First check whether the browser already discovers it early and whether it is the LCP element. If discovery is late, a template-specific preload may help—but it must match the image actually selected for that product and viewport.
Can preconnect improve a page if all critical files come from my store’s own origin?
It is usually unnecessary for the origin the browser has already connected to in order to load the page. Preconnect is primarily useful for a separate origin that serves an important resource soon afterward.
Is preload the same as lazy loading?
No. Preload asks the browser to fetch a particular resource early. Lazy loading delays eligible resources until they are closer to being needed. They serve different purposes; avoid lazy-loading a critical first-screen image.
How do I know whether a preload is wasting bandwidth?
Check the browser’s network panel for an unused preload, a duplicate download, or a file that differs from the one the page ultimately uses. Compare transferred bytes and page behavior across mobile and desktop views after making the change.