Resource hints tell the browser about work it will need to do soon, so it can start early. Powered Cache adds three kinds: DNS Prefetch and Preconnect prepare connections to other servers, and Preload Fonts downloads important font files before the browser discovers them in your CSS. Used for the right few resources, they make text and third-party content appear sooner.
Available in: Powered Cache (free)
Where to find it: Powered Cache → Preload, in the Resource hints group
Which hint to use #
| Hint | What the browser does early | Use it for |
|---|---|---|
| DNS Prefetch | Looks up the server’s address. | Third-party domains the page uses later, such as analytics, chat or ad scripts. It is cheap, so a handful of domains is fine. |
| Preconnect | Looks up the address and opens the full connection, including the secure (TLS) handshake. | One to three third-party origins that load something important early on the page. Each preconnect costs some work, so do not list every domain. |
| Preload Fonts | Downloads the font file right away, with high priority. | The one or two fonts used for text that is visible when the page opens, such as body text or headings. |
All three fields are empty by default. Resource hints are only a suggestion to the browser, so measure your pages before and after (for example with PageSpeed Insights). An unused preload wastes bandwidth and can delay more important files, and browsers warn about it in the console.
Add resource hints #
- Find the domains and fonts your pages load. In your browser’s developer tools, open the Network tab and reload the page.
- Go to Powered Cache → Preload.
- Enter the values in DNS Prefetch, Preconnect or Preload Fonts, one per line.
- Click Save Settings and clear the cache.
- View the page source and check the
<link rel="dns-prefetch">,<link rel="preconnect">and<link rel="preload">tags in the<head>.
Settings #
DNS Prefetch #
One domain per line. You can enter //www.googletagmanager.com or https://www.googletagmanager.com. Only the host name is used, so paths are ignored. The hints are added through WordPress, together with the ones WordPress and other plugins add.
//www.googletagmanager.com
//connect.facebook.net
Preconnect #
One origin per line. Enter the full origin with https://, for example https://cdn.example.com. Only the scheme and host name are used. Without a scheme, the hint may be created for http:// or without a scheme, which does not help an https:// request.
The preconnect hints from this field do not include the crossorigin attribute. Fonts are always downloaded in CORS mode, which uses a separate connection, so a preconnect without crossorigin may not help font requests. For an important font, use Preload Fonts instead.
Preload Fonts #
One font file per line. Accepted formats:
- a full URL:
https://example.com/wp-content/themes/theme/assets/fonts/inter.woff2 - a path from the root of your domain:
/wp-content/uploads/fonts/brand.woff - a protocol-relative URL:
//fonts.example.com/brand.woff2(loaded overhttps://)
The file must end in .woff2, .woff, .ttf or .otf. Other lines are ignored. Each font is added near the top of the <head> as <link rel="preload" as="font" crossorigin> with the matching font type. Use the exact URL your CSS uses, including any version query string, or the browser downloads the font twice. Prefer WOFF2 files: they are the smallest.
If CDN Integration is on, font URLs on your domain are served from the CDN. The CDN must then send the right CORS header. See CORS for fonts.
Preload Fonts and LCP font preloading #
With Powered Cache Premium, LCP Optimization also preloads fonts automatically. It finds @font-face rules in inline <style> blocks of the page and preloads the first two WOFF2 or WOFF files. It does not see fonts that are only declared in external stylesheet files.
- Use Preload Fonts for fonts declared in external CSS files, for TTF or OTF fonts, or when you want to choose the fonts yourself.
- With LCP Optimization on, check the page source before you add fonts here. Fonts that LCP Optimization already preloads do not need a second entry.
Changed in 4.0: LCP font preloading in Powered Cache Premium is on by default whenever LCP Optimization is on. Before 4.0, it had to be turned on with a filter.
For developers #
The lists can be changed in code with the powered_cache_prefetch_dns, powered_cache_preconnect_resource and powered_cache_preload_fonts filters. See the Hooks Reference.
Related docs #
- LCP Optimization (Premium)
- Google Fonts Optimization
- Self-Host Google Fonts (Premium)
- Instant Navigation (Premium)