Skip to main content
GrN.dk

Main navigation

  • Articles
  • Cases
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

Speculative Loading Without Surprises: A CMS Operations Checklist

By Greg Nowak. Updated 27 July 2026.

Speculative loading can make the next page in a customer journey feel remarkably fast. The browser fetches—or, more aggressively, prepares—a likely destination before the visitor clicks. That is useful when someone moves from an article to a service page, a listing to a product, or a case study to a contact form.

It is also easy to treat the feature as a harmless performance switch. It is not. Rules may be generated by a CMS, injected by a CDN, or added by a developer. They can overlap, touch stateful routes, consume cache capacity, and cause scripts to run before a page is actually viewed. The right question is therefore not “Can we enable it?” but “Which journeys should we accelerate, under whose control, and how will we know it is safe?”

Start with prefetch, not maximum speed

Prefetch retrieves a likely next document so navigation can begin with less waiting. Prerender goes further by preparing the page and potentially running its JavaScript before activation. Prerender can deliver a larger improvement, but it also raises the stakes for analytics, consent tools, personalization and application state.

For most business websites, same-origin prefetch with conservative or interaction-led eagerness is the sensible starting point. Reserve prerender for a small number of predictable, well-tested journeys.

Route or journey Starting decision What to verify
Public article, service or product page Allow conservative prefetch Cacheability and useful next-page demand
Homepage to a priority service page Test targeted prefetch Journey frequency and wasted-request rate
High-confidence, anonymous next step Consider selective prerender Analytics, consent and JavaScript activation
Login, logout, account, cart or checkout Exclude by default Personalization, stale state and side effects
Search, filters, previews and admin paths Review individually Query volume, cache pollution and access control
A first-pass decision matrix. The final allowlist and exclusions should reflect the application, not the CMS label.

Find every place rules can originate

Do not assume the feature has one owner. Inspect pages for <script type="speculationrules">, check responses for a Speculation-Rules header, and review CMS extensions, theme code, tag-manager injections and CDN settings.

WordPress introduced speculative loading in Core 6.8. Its documented baseline is conservative frontend prefetching, disabled for logged-in visitors and sites without pretty permalinks. WordPress also supplies configuration and exclusion filters plus the no-prefetch and no-prerender classes. Those defaults are a good guardrail, not a substitute for reviewing ecommerce, membership and custom-plugin routes.

Cloudflare Speed Brain can add a Speculation-Rules response header. Its current safeguards restrict prefetches to cache-eligible pages, prevent them from reaching the origin on a cache miss, and exclude routes invoking Workers. That lowers origin-side risk but does not resolve duplicate rules, cache strategy, CSP compatibility or ownership.

Drupal’s contributed Speculative Loading module offers configurable prefetch and prerender modes. As of this update, its current release is still a beta and Drupal.org lists no supported stable release. Treat adoption as a reviewed dependency: test it in your site’s Drupal and PHP versions, record who owns updates, and avoid presenting it internally as a Core default.

Exclude unsafe GET routes before testing speed

A background GET request must not log a visitor out, add an item, submit a workflow, change a record or mark something as read. Exclude any such URL immediately. The longer-term fix is to remove state-changing behaviour from GET routes, because crawlers, link scanners and other automated clients can expose the same flaw.

Also exclude personalized or rapidly changing pages where prefetched content may become stale. Cart totals, account notices, entitlement checks and search results deserve deliberate review even when they do not directly change state.

Test measurement and consent as product behaviour

Prefetch generally creates fewer problems because the destination document is not fully running. During prerender, however, client-side code may execute before the visitor sees the page. A page view, advertising impression, heatmap session, experiment assignment or CRM event should normally wait for activation.

Do not settle for “Google Analytics supports it.” Test the actual stack: tag manager, consent platform, custom events, pixels, session replay and experimentation code. Chrome exposes document.prerendering and the prerenderingchange event so activation-sensitive work can be delayed. After activation, a non-zero PerformanceNavigationTiming.activationStart identifies a prerendered navigation.

Use these implementation checks

Begin with the response headers:

curl -I https://example.com/

If Speculation-Rules appears, inspect the referenced JSON as well as any inline rules. An external rules file must be served as application/speculationrules+json. Inline rules on a site with Content Security Policy need 'inline-speculation-rules', an appropriate nonce, or a hash in script-src. Check the browser console and CSP reports rather than assuming silence means success.

For WordPress, keep sensitive path exclusions in version-controlled site code:

add_filter(
    'wp_speculation_rules_href_exclude_paths',
    function ( $paths ) {
        $paths[] = '/cart/*';
        $paths[] = '/checkout/*';
        $paths[] = '/account/*';
        return $paths;
    }
);

Then use Chrome DevTools to inspect the Application panel’s speculation rules and the Network panel. Look for requests carrying Sec-Purpose: prefetch. Test as both an anonymous visitor and an authenticated user, and repeat the test after cache, CMS, theme or CDN configuration changes.

A rollout that operations can support

Start with a small group of anonymous, cacheable routes. Record the rule source, allowed paths, exclusions, expected customer journey and rollback method. Compare next-page navigation performance, cache hit rate, request volume and conversion instrumentation before expanding the scope.

Only promote a route to prerender after analytics, consent, personalization and activation behaviour pass real-browser testing. Assign one owner to review the setup after CMS releases, plugin changes, campaign launches and CDN migrations.

The useful deliverable is not merely a faster click. It is a controlled configuration that the business can explain, test and safely change. If your rules are spread across WordPress, Drupal, Cloudflare and third-party scripts, Greg can help turn them into one practical performance and operations plan.

Related on GrN.dk

  • Cloudflare Page Rules Debt: How Quiet Configuration Drift Breaks Business Websites
  • AI Crawler Control for Business Websites: Protect Content Without Vanishing from Search
  • A stray Set-Cookie can waste your CDN: audit the cache at the edge

Need help with this kind of work?

Review your speculative-loading setup with Greg Get in touch with Greg.

Sources

  • Speculative Loading in WordPress 6.8
  • Cloudflare Speed Brain documentation
  • Chrome: Implementing speculation rules on complex sites
  • MDN Speculation Rules API
  • Drupal Speculative Loading module
Last modified
2026-07-27

Tags

  • Speculative Loading
  • wordpress
  • Drupal
  • Cloudflare
  • Web Performance

Review Greg on Google

Greg Nowak Google Reviews

 

Illustrated infographic summarizing: A stray Set-Cookie can waste your CDN: audit the cache at the edge
A stray Set-Cookie can waste your CDN: audit the cache at the edge
2026-07-27

Cloudflare Cache Response Rules can recover wasted CDN capacity, but first you need a route-level audit of public, personal and authenticated responses.

Illustrated infographic summarizing: Shorter TLS certificates expose every renewal you never automated
Shorter TLS certificates expose every renewal you never automated
2026-07-26

Shorter TLS lifetimes leave less room for manual handoffs and faulty deploy hooks. Build a renewal path that protects service availability.

Illustrated infographic summarizing: One Timeout, Two Orders: Make AI Actions Safe to Retry
One Timeout, Two Orders: Make AI Actions Safe to Retry
2026-07-25

A timed-out AI action may already have succeeded. Stable keys, durable ledgers, queues and stored results prevent a routine retry from duplicating real work.

Illustrated infographic summarizing: Your AI Visibility Dashboard Needs a Methodology, Not More Charts
Your AI Visibility Dashboard Needs a Methodology, Not More Charts
2026-07-24

A practical framework for measuring AI-search visibility with fixed prompts, repeated tests, separate metrics, retained evidence, and honest reporting.

Illustrated infographic summarizing: AI Admin APIs Are Here—But Your Directory Is Still the Source of Truth
AI Admin APIs Are Here—But Your Directory Is Still the Source of Truth
2026-07-23

New AI admin APIs can automate access and spend controls, but reliable governance still starts with authoritative directory data and clear ownership.

Illustrated infographic summarizing: OpenAI Presence Arrived—But Is Your Workflow Ready for an Agent?
OpenAI Presence Arrived—But Is Your Workflow Ready for an Agent?
2026-07-22

Before an AI agent can take on real work, its workflow needs clear scope, permissions, handoffs, evaluation cases, and production monitoring.

Illustrated infographic summarizing: Chatbot Transcripts Quietly Became a Retention and Redaction Problem
Chatbot Transcripts Quietly Became a Retention and Redaction Problem
2026-07-21

Chatbot transcripts spread across providers, logs and support tools. Here is how to map each copy, redact sensitive data and test deletion properly.

Illustrated infographic summarizing: Cloudflare Service Keys Stop in September: Find Every Caller
Cloudflare Service Keys Stop in September: Find Every Caller
2026-07-20

Cloudflare Service Keys stop working on September 30, 2026. Here is how to find every caller, move to scoped API tokens and avoid a late outage.

Illustrated infographic summarizing: Your AI Workflow Needs an Acceptance Test Before It Meets Customers
Your AI Workflow Needs an Acceptance Test Before It Meets Customers
2026-07-19

A practical way to test AI workflows using realistic scenarios, tool checks, human rubrics, regression suites, and clear release gates.

Three cover candidates for The Goats Were Load-Bearing fanned on a dark background: an ember-lit door, three slow knocks, and a founders' ledger
The Goats Were Load-Bearing: a fantasy where the bill always comes due
2026-07-19

A teaser for the upcoming darkly comic fantasy novel The Goats Were Load-Bearing — a village, a door that must stay poor, and the worst possible time to sell the herd. Readers pick the cover.

More articles
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.