swissup / module-speculation-rules
Swissup Speculation Rules Module
Installs: 4 784
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: ^7.4|^8.0|^8.1|^8.2|^8.3
- magento/framework: ^102.0|^103.0
- swissup/module-core: ^1.12.20
This package is auto-updated.
Last update: 2024-10-31 11:14:49 UTC
README
Description
The Speculation Rules API is a JSON-defined API developed by Google to enhance the performance of web page loading through speculative loading strategies. One more description by Mozilla MDN.
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
Prerender with the Speculation Rules API
Browser Support
Can I use Speculation Rules?
Installation
For clients
cd <magento_root> composer require swissup/module-speculation-rules bin/magento module:enable Swissup_SpeculationRules Swissup_Core bin/magento setup:upgrade
For maintainers
cd <magento_root> composer require swissup/module-speculation-rules:dev-master --prefer-source bin/magento module:enable Swissup_SpeculationRules Swissup_Core bin/magento setup:upgrade