PHPackages                             swissup/module-speculation-rules - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. swissup/module-speculation-rules

ActiveMagento2-module

swissup/module-speculation-rules
================================

Swissup Speculation Rules Module

1.0.4(3mo ago)129.7k—0.6%1MITPHPPHP ^7.4|^8.0|^8.1|^8.2|^8.3

Since May 28Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/swissup/module-speculation-rules)[ Packagist](https://packagist.org/packages/swissup/module-speculation-rules)[ RSS](/packages/swissup-module-speculation-rules/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

Magento 2 Speculation Rules module
==================================

[](#magento-2-speculation-rules-module)

### Description

[](#description)

The [Speculation Rules API](https://github.com/WICG/nav-speculation/blob/main/triggers.md#speculation-rules) is a JSON-defined API developed by Google to enhance the performance of web page loading through speculative loading strategies. One more [description](https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API) by Mozilla MDN.

### How Does It Work?

[](#how-does-it-work)

Google's Speculation Rules API is designed to target document URLs rather than specific resource files. The Speculation Rules API introduces a more expressive and configurable syntax for specifying which documents should be prefetched or prerendered. With a structure defined in JSON format within a script `type="speculationrules"`, developers can articulate rules for both prerendering and prefetching. This enhanced flexibility allows for fine-tuning speculative loading.

### Pagespeed Impact

[](#pagespeed-impact)

[Prerender with the Speculation Rules API](https://developer.chrome.com/docs/web-platform/prerender-pages#impact)

### Browser Support

[](#browser-support)

Can I use [Speculation Rules](https://caniuse.com/?search=Speculation%20Rules%20)?

### [Installation](https://docs.swissuplabs.com/m2/extensions/speculation-rules/installation/)

[](#installation)

###### For clients

[](#for-clients)

```
cd
composer require swissup/module-speculation-rules
bin/magento module:enable Swissup_SpeculationRules Swissup_Core
bin/magento setup:upgrade
```

###### For maintainers

[](#for-maintainers)

```
cd
composer require swissup/module-speculation-rules:dev-master --prefer-source
bin/magento module:enable Swissup_SpeculationRules Swissup_Core
bin/magento setup:upgrade
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~157 days

Total

5

Last Release

90d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33aea824c2948821ee367ad65fab9d355c71d86ce4ff021a40882a410f14ef94?d=identicon)[swissup](/maintainers/swissup)

![](https://www.gravatar.com/avatar/b5eb663f2c3faab23d84a3ea1e7cbb2ff3afb0e27c10eefd018e48455c997c07?d=identicon)[0m3r](/maintainers/0m3r)

---

Top Contributors

[![0m3r](https://avatars.githubusercontent.com/u/412612?v=4)](https://github.com/0m3r "0m3r (21 commits)")[![ci-swissuplabs](https://avatars.githubusercontent.com/u/40459861?v=4)](https://github.com/ci-swissuplabs "ci-swissuplabs (3 commits)")[![NikoNikoUA](https://avatars.githubusercontent.com/u/128256922?v=4)](https://github.com/NikoNikoUA "NikoNikoUA (1 commits)")

### Embed Badge

![Health badge](/badges/swissup-module-speculation-rules/health.svg)

```
[![Health](https://phpackages.com/badges/swissup-module-speculation-rules/health.svg)](https://phpackages.com/packages/swissup-module-speculation-rules)
```

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.2M1](/packages/fastly-magento2)[swissup/module-search-mysql-legacy

Legacy mysql search for magento 2.4

10483.0k](/packages/swissup-module-search-mysql-legacy)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)[mage-os/mageos-common-async-events

Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

147.7k2](/packages/mage-os-mageos-common-async-events)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
