[๐] Disable Link prefetch true by default
andreslopezdreams opened this issue ยท 2 comments
Which component is affected?
Qwik City (routing)
Describe the bug
I have created a new project from scratch with QwikCity version 1.5.3 and all the links load the prefetch to true by default without placing it
<Link href="/other">Go to other Router</Link>
It behaves as if prefetch ownership places in all links
<Link href="/otro" prefetch={true}>Go to other Router</Link>
And any link where the mouse passes is loaded, is there a way to change this behavior and that all the links are in false prefetch?
Reproduction
Steps to reproduce
npm i && npm run dev
System Info
System:
OS: macOS 11.7.10
CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Memory: 715.30 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.4 - /usr/local/bin/npm
npmPackages:
@builder.io/qwik: ^1.5.2 => 1.5.3
@builder.io/qwik-city: ^1.5.2 => 1.5.3
typescript: 5.3.3 => 5.3.3
undici: * => 6.15.0
vite: ^5.1.6 => 5.2.11
Additional Information
New and empty project from npm create qwik@latest
I think this is the intended behavior since #5480. Still, I agree it would be great to have a way to toggle it globally. Until then you can set prefetch={false} on your Link components if you don't want that behavior.
yeah we need docs on this and how to turn off prefetching