#[Possible Issue] - Prefetch Not Triggering for Link in Dev
1 messages · Page 1 of 1 (latest)
Are you checking this in dev or build & preview mode?
If I remember correctly, prefetching only happens in the built site
Btw, do you want links to prefetch on hover or when they are in the viewport? Because your config setting and your data attribute specify two different prefetch strategies
If you want to prefetch on hover, that is already the default behavior. You only need to set prefetch: true in the config then and can just use a boolean attribute:
<a href="/about" data-astro-prefetch>About</a>
You can even prefetch all links and omit the attribute entirely using the config described here: https://docs.astro.build/en/guides/prefetch/#prefetch-all-links-by-default
Ah, my bad, I didn’t see that part of the title. It was cut off on my screen.
Maybe the pages are already in the cache? Can you try again in your browser’s guest mode?
What do you mean by „live server from dist“? I always check with „astro preview“
Interesting, maybe a FF setting that prevents prefetching on localhost?
You could try again on a published site
I’ve read that there is an about:config setting for enabling prefetching in FF
network.prefetch-next
But I can’t verify as I‘m on mobile right now
Welp, there you go
xd
Nice!
- From the ellipses (3-dot menu) in the top-right corner of the post (not the first message), edit the tags to include the Solved tag.
- From the same ellipses, select Close Post.
Your post will still be available to search and can be re-opened simply by replying in it. Closing a post moves it down with older posts, so we can more easily focus on issues that still need to be resolved.
Thank you for your help!
i just hope that firefox will keep focusing on privacy, cause it's the only thing that makes it competable with chromium...
not that mozilla would do anything stupid... https://youtu.be/4litc5DxoHQ 😂😂
Guest: https://youtube.com/@UCd3dNckv1Za2coSaHGHl5aA
Twitch https://twitch.tv/ThePrimeagen
Discord https://discord.gg/ThePrimeagen
Become Backend Dev: https://boot.dev/prime
(plus i make courses for them)
This is also the best way to support me is to support yourself becoming a better backend engineer.
LINKS
-- https://x.com/Brend...
i didnt do much, but thank you 💜
You had /solved on speed dial, that still counts! 😄
ah, that's nothing, have a nice one!
i fired it out instantly 🤣
kinda not very kind tho... 😭