Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Speculative Loading

157 sites Security covered
View on drupal.org

This module improves website navigation speed by intelligently preloading pages users are likely to visit next. It uses the Speculation Rules API to either prefetch or prerender pages, offering near-instant loading experiences with configurable settings and no complex setup.

This module is part of the DXPR ecosystem and included in DXPR CMS.

Speculative Loading enables browsers to preload pages users are likely to visit next, creating near-instant navigation experiences on your Drupal site. By intelligently prefetching or prerendering pages based on user interactions, this module dramatically improves perceived performance without requiring complex technical setup.

You need Speculative Loading if

  • You want to improve your site's perceived performance and navigation speed
  • You need near-instant page loading without complex technical setup

Features

- Implements the modern Speculation Rules API to improve website performance
- Supports both prefetch (lightweight) and prerender (full-page) modes
- Configurable eagerness levels (Conservative, Moderate, or Eager) to balance performance and resource usage
- No-code required: works automatically on standard Drupal frontend pages
- "No-prerender" CSS class can be added to exclude specific links
- Hook API allows programmatic exclusion of URL patterns
- Plugin system for extending functionality with custom rules

Post-Installation

After installing the module, it works immediately with default settings. To customize:

1. Navigate to "Configuration" > "Development" > "Performance" > "Speculative Loading"
2. Choose between "Prefetch" or "Prerender" mode (prerendering provides faster experiences but may affect interactive content)
3. Select your preferred eagerness level
4. Save your configuration

No additional setup is required as the module automatically adds the necessary markup to your pages.

While not required, the following modules complement Speculative Loading:
- BigPipe: For progressive page rendering

Supporting this Module

This module is maintained by DXPR. If you find it valuable, consider checking out our free page builder (with paid features for large websites):
- https://www.drupal.org/project/dxpr_builder

Community Documentation

- Speculation Rules API on MDN
- Chrome's documentation on prerendering

Browser Support

The Speculation Rules API is supported in modern Chromium-based browsers (Chrome, Edge, Opera). Other browsers will gracefully ignore the functionality with no negative effects.

Wider browser support is underway: Firefox is actively working on implementing the Speculation Rules API. You can track their progress here: Firefox Bug #1969396

Activity

Total releases
2
First release
Apr 2025
Latest release
2 months ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Release date
1.0.0-beta2 Pre-release May 15, 2026
1.0.0-beta1 Pre-release Apr 17, 2025