You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Create the following HTML file, and then watch the network tab as all of the links are prefetched.
<!DOCTYPE html><html><head><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible" content="IE=edge"><title>Prefetch: Basic Usage</title><metaname="viewport" content="width=device-width, initial-scale=1"><scriptsrc="https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver"></script></head><body><ahref="link1">Lorem, ipsum.</a><ahref="link2">Eligendi, mollitia.</a><ahref="link3">Tempore, optio.</a><ahref="link4">Perspiciatis, modi!</a><ahref="link5">Voluptates, quas!</a><ahref="link6">Quibusdam, laborum.</a><ahref="link7">Veritatis, aspernatur?</a><ahref="link8">Obcaecati, totam!</a><ahref="link9">Repellat, ex.</a><ahref="link10">Laboriosam, explicabo.</a><ahref="link11">Saepe, harum.</a><ahref="link12">Aperiam, ad.</a><ahref="link13">Ut, quae!</a><ahref="link14">Et, sint.</a><ahref="link15">Facere, alias!</a><ahref="link16">Exercitationem, voluptatem.</a><ahref="link17">Sed, odio?</a><ahref="link18">Dicta, eum.</a><ahref="link19">Commodi, veniam.</a><ahref="link20">Quod, similique!</a><scriptsrc="https://unpkg.com/quicklink@2.1.0/dist/quicklink.umd.js"></script><script>// Limit does not work if it is >=4 *and* throttle property is set.quicklink.listen({limit: 4,throttle: 3});</script></body></html>
Expected behavior
I expect only 4 links to be prefetched
Version:
OS w/ version: MacOS 11.2.1 Big Sur
Browser w/ version: Version 90.0.4430.212 (Official Build) (x86_64)
Additional context, screenshots, screencasts
What's weird is that if the throttle option is not set, it works properly. Also, if the limit option is set to 3 or below, it will work properly even with the throttle option set.
Apologies for the delayed response. The video is very clear, thanks for taking the time of doing this.
We have a bug triage session coming soon, where we'll analyze this issue among others, to see if it makes sense to include a fix in the next version of Quicklink.
We are currently exploring the idea of coming up with a good default for the behavior of the library, since, without any limits, it can be very aggressive in platforms like desktop.
I'm curious to understand why you have picked the combination of "4" for the limit and "3" for throttle. Is that the configuration you typically use?
This was really hard to track down and is kinda weird, so bear with me.
If the following is true, the
limit
option is not respectedlimit
option is greater or equal to4
throttle
option is setI posted a quick 1 minute video of this at https://youtu.be/hb5hBDZqTdY
To Reproduce
Create the following HTML file, and then watch the network tab as all of the links are prefetched.
Expected behavior
I expect only 4 links to be prefetched
Version:
Additional context, screenshots, screencasts
What's weird is that if the
throttle
option is not set, it works properly. Also, if thelimit
option is set to3
or below, it will work properly even with thethrottle
option set.Video showing the problem in action: https://youtu.be/hb5hBDZqTdY
The text was updated successfully, but these errors were encountered: