rafaelcg/magento2-quicklink

Faster subsequent page-loads by prefetching in-viewport links during idle time

Installs: 15 272

Dependents: 0

Suggesters: 0

Security: 0

Stars: 51

Watchers: 9

Forks: 13

Open Issues: 1

Type:magento2-module

2.2.1 2022-12-07 22:37 UTC

This package is auto-updated.

Last update: 2024-12-08 03:37:03 UTC


README


Magento 2 Quicklinks
Magento 2 Quicklink Module
Magento 2 Quicklinks Stable Version Magento 2 Quicklinks Stable Version Magento 2 Quicklinks Magento 2 Quicklinks

Faster subsequent page-loads by prefetching in-viewport links during idle time

How does it works?

Magento 2 Quicklink module attempts to make navigations to subsequent pages load faster.

  • Detects links within the viewport (using Intersection Observer)
  • Waits until the browser is idle (using requestIdleCallback)
  • Checks if the user isn't on a slow connection (using navigator.connection.effectiveType) or has data-saver enabled (using navigator.connection.saveData)
  • Prefetches URLs to the links (using <link rel=prefetch> or XHR). Provides some control over the request priority (can switch to fetch() if supported).

Install

Via Composer

Install using Composer.

composer require rafaelcg/magento2-quicklink
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean

How to use

After installation, it will be enabled by default. You can find the configuration into Stores > Configuration > General Web > Google Quicklink.

Rafael CorrĂȘa Gomes