The Quicklink module provides an implementation of Google Chrome Lab's Quicklink library for Drupal. Quicklink is a lightweight (< 1kb compressed) JavaScript library that enables faster subsequent page-loads by prefetching in-viewport links during idle time.
How Quicklink works
Quicklink attempts to make navigations to subsequent pages load faster. It detects links within the viewport, waits until the browser is idle , checks if the user isn't on a slow connection , then prefetches URLs to the links.
What this module provides:
This module navigates through some Drupalisms and
- Inserts the Quicklink library — either off of a CDN, or off the filesystem (if present). The Quicklink JS library is not hosted within the repo.
- Works with
Drupal.behaviorsto automatically prefetch URLs that get inserted via AJAX. - By default, loads the Quicklink library only for anonymous users.
- Option to disable loading the Quicklink library on individual content types.
- Has an option to disable loading the Quicklink library is PHP sessions are detected (useful for Drupal Commerce sites).
- By default, ignores the prefetching of administrative links, AJAX-enabled links, and links that end with a file extension.
- Provides option to ignore URLs with hashes (#) in them.
- Provides a field for URL patterns to ignore.
- Will not prefetch if a
noprefetchparameter exists within the URL querystring. - Automatically ignores links that have a
noprefetchordownloadattribute. - Automatically ignores the
user/logoutlink. - Provides a field to include additional domains that Quicklink will prefetch from (other than the origin domain).
- Provides a debug mode checkbox that will help you figure out why or why not a link is getting prefetched.
- Option to load Intersection Observer polyfill so Quicklink will work with older browsers.
Documentation
https://www.drupal.org/docs/8/modules/quicklink
Project Link
https://www.drupal.org/project/quicklink
Git Instructions
git clone --branch 8.x-1.x https://git.drupal.org/project/quicklink.git
PAReview checklist
https://pareview.sh/pareview/https-git.drupal.org-project-quicklink
Comments
Comment #2
mherchelComment #3
avpadernoThank you for your contribution! Reviewers will soon check the code and report here what they found out.
If you still haven't done it, please check what reported from the PAReview checklist. There could be some false positives; be careful of not changing code that should not be.
Comment #4
hasmimeraj commented@mherchel Please implement hook_help in quicklink.module file. Seehttps://www.drupal.org/docs/develop/documenting-your-project/module-docu...
Comment #5
hasmimeraj commentedComment #6
mherchelFixed! hook_help is now implemented. Latest PAReview results at https://pareview.sh/pareview/https-git.drupal.org-project-quicklink
Comment #7
klausiWhat, Mike is not allowed to publish modules under the Security Team umbrella yet? Scandalous, let's change that!
config schema for quicklink.settings is missing. PHPUnit tests are also missing, they would have complained about that ;-)
Otherwise all looking good, thanks!
Comment #8
mherchelThanks @klausi !
I'll create some followup issues for config schema and testing :)
Comment #9
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.