Skip to content
EN

Speculative Loading for WordPress

Turn on Speculative Loading for WordPress with a free plugin so the browser loads the next page early, then pick the mode that fits your site.

Speculative Loading does not wait for the reader to click a link before it loads the page. The browser guesses the page they are about to open and loads it, or its resources, into memory ahead of time, so the page opens faster when they click.

The technique cuts both ways. Pages open faster, but loading too many pages ahead can overload the server. So before you pick a mode, you need to know what Speculative Loading loads and when.

What to prepare

  • WordPress 6.9 or later, because the current plugin version (1.7.0) needs it. Check the version in the admin area. The site in the video ran 6.8.1, when the plugin still accepted 6.8.1
  • Permalinks set to postname or similar. The WordPress default style does not work. Any of the other styles below is fine, and most people pick the post name. Remember to save.
  • A cache plugin already set up for the site, so the server does not get overloaded when the browser loads many pages ahead.

Two preload modes

Two preload modes
Load the whole page and it shows at once
Mode What it loads Fits
Prefetch Only the page’s HTML document, not its CSS or scripts. The page opens faster when clicked.2 Sites with many posts that need to spare the server
Prerender The whole page. It shows the moment you click. Sites made mostly of pages, with many landing pages

The eagerness setting decides when the browser starts loading. At Moderate, it starts when you hover over a link. At Eager (on slightest suggestion), the browser starts sooner, on mobile too.

Turn on Speculative Loading

  1. Install the Speculative Loading plugin

    Install the free plugin Speculative Loading (opens in a new tab).

    Once installed, go to Settings > Reading to set it up.

  2. Pick one of the two recommended setups

    • Prerender + Moderate (typically on hover). Fits a site with many landing pages that should load as fast as possible. On mobile it may do little, since there is no hover.
    • Prefetch + Eager (on slightest suggestion). This one loads ahead on mobile too and can get the cache ready better, but it is not as fast as the first.

    The cuongthach.com site has many blog posts, so it uses the second. If your site is mostly pages and landing pages, use the first so pages open as fast as possible.

  3. Clear the cache

    Clear the cache and you are done.

Check it works

Log out of the admin account and open the site as a reader. Hover over a link, and the browser starts loading that page ahead. Click it, and the page appears almost at once.

Notes on using it

Without a cache, the requests that load pages ahead can overload your server, so the site hangs or slows down, and the speed gain is gone.

Pages with many links are the most likely to overload the server. Let the browser load every link freely and each visit costs extra server resources for pages the reader may never open. So set it up with care. Loading only when the reader hovers over a link is the safer choice.

Speculative Loading no longer needs an extra script as older methods did, because the browser supports it. At the time of writing (May 2025), Safari and Firefox did not support it yet. As of October 2026, Safari has it but turned off by default, and Firefox has only partial support, so in practice it is still mainly Chrome, Edge and Opera.3

WordPress 6.8 turns Speculative Loading on by default at its lightest level, only for logged-out visitors and only on sites with pretty permalinks.4 On the cuongthach.com site this default feature did not turn on until the plugin in this guide was installed. The plugin also lets you pick a stronger mode.

  • It does not teach caching for your website: see LiteSpeed Cache.
  • It does not explain why every post goes on your website first: see Website.

References

Cross-checked · 4 sources ·
1 views

Suggest an edit

Spotted something wrong, missing or unclear? Say it in a few lines. Every suggestion is read by hand.

What is it about?

optional, only to reply to you

CuongThach Docs

94,027 words

87 commits
Write to Sell

Type to search…

↑↓ navigate↵ selectEsc close