We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Reading the code, I fail to find where it actually "fallbacks to XHR".
// Prefetch the given url using native 'prefetch'. Fallback to 'xhr' if not supported const prefetch = (url) => new Promise((resolve, reject) => { const link = document.createElement(`link`); link.rel = `prefetch`; link.href = url; link.onload = resolve; link.onerror = reject; document.head.appendChild(link); });
It does not seem to be a fallback mechanism built in here.
This code is, if I read it correctly, in fact not even running since we stop execution on line 21 if prefetch is not supported:
// Don't start prefetching if user is on a slow connection or not supported if (isSlowConnection || !isSupported) return;
Am I missing something? If not, I'll happily make a PR that actually implements XHR. I guess this be very inspired by how Quicklink does it.
The text was updated successfully, but these errors were encountered:
Looks like this was removed in this commit and released in 2.0.8.
Sorry, something went wrong.
No branches or pull requests
Hi,
Reading the code, I fail to find where it actually "fallbacks to XHR".
It does not seem to be a fallback mechanism built in here.
This code is, if I read it correctly, in fact not even running since we stop execution on line 21 if prefetch is not supported:
Am I missing something? If not, I'll happily make a PR that actually implements XHR. I guess this be very inspired by how Quicklink does it.
The text was updated successfully, but these errors were encountered: