承接 rangerz/magento2-module-quicklink 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rangerz/magento2-module-quicklink

Composer 安装命令:

composer require rangerz/magento2-module-quicklink

包简介

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

README 文档

README

A Magento 2 module integrates GoogleChromeLabs/quicklink, ⚡️Faster subsequent page-loads by prefetching in-viewport links during idle time.

Supported Magento Versions Latest Stable Version Composer Downloads Maintained - Yes

How it works

Quicklink attempts to make navigations to subsequent pages load faster. It:

  • 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 (using <link rel=prefetch> or XHR) or prerenders (using Speculation Rules API) URLs to the links. Provides some control over the request priority (can switch to fetch() if supported).

Installation

composer require rangerz/magento2-module-quicklink
bin/magento module:enable Rangerz_Quicklink
bin/magento setup:upgrade

Usage

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

Google Quicklink

  • Enable Google Quicklink

  • Enable in Backend

  • Enable in Developer Mode

Quicklink Listen Options

  • Prerender Mode

    • Default: No (Boolean)

    Whether to switch from the default prefetching mode to the prerendering mode for the links inside the viewport.Prerender and Prefetch

    Note: The prerendering mode (when this option is set to true) will fallback to the prefetching mode if the browser does not support prerender.

  • Prerender and Prefetch

    • Default: No (Boolean)

    Whether to activate both the prefetching and prerendering mode at the same time.

  • Delay (MS)

    • Default: 0 (Number)

    The amount of time each link needs to stay inside the viewport before being prefetched, in milliseconds.

  • Element

    • Default: document.body (HTMLElement|NodeList)

    The DOM element to observe for in-viewport links to prefetch or the NodeList of Anchor Elements.

  • Request Limit

    • Default: Infinity (Number)

    The total requests that can be prefetched or prerendered while observing the Element container.

  • Threshold

    • Default: 0 (Number)

    The area percentage of each link that must have entered the viewport to be fetched, in its decimal form (e.g. 0.25 = 25%).

  • Concurrency Limit

    • Default: Infinity (Number)

    The* concurrency limit *for simultaneous requests while observing the Element container.

  • Timeout (MS)

    • Default: 2000 (Number)

    The requestIdleCallback timeout, in milliseconds.

    Note: The browser must be idle for the configured duration before prefetching.

  • Priority

    • Default: No (Boolean)

    Whether or not the URLs within the Element container should be treated as high priority.

    When Yes, quicklink will attempt to use the fetch() API if supported (rather than link[rel=prefetch]).

  • Origins

    • Default: [location.hostname] (Array)

    A static array of URL hostnames that are allowed to be prefetched.

    Defaults to the same domain origin, which prevents any cross-origin requests.

    Important: An empty array ([]) allows all origins to be prefetched.

  • Ignore List

    • Default: [] (RegExp or Function or Array)

    Determine if a URL should be prefetched.

    When a RegExp tests positive, a Function returns true, or an Array contains the string, then the URL is not prefetched.

    Note: An Array may contain StringRegExp, or Function values.

    Important: This logic is executed after origin matching!

Option not supported for setting

  • timeoutFn

  • onError

  • hrefFn

Credits

Inspired by rafaelstz/magento2-quicklink

License

MIT

rangerz/magento2-module-quicklink 适用场景与选型建议

rangerz/magento2-module-quicklink 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.08k 次下载、GitHub Stars 达 34, 最近一次更新时间为 2022 年 12 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 rangerz/magento2-module-quicklink 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 rangerz/magento2-module-quicklink 我们能提供哪些服务?
定制开发 / 二次开发

基于 rangerz/magento2-module-quicklink 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10.08k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 34
  • 点击次数: 27
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 34
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-07