#[Possible Issue] - Prefetch Not Triggering for Link in Dev

1 messages · Page 1 of 1 (latest)

hexed lantern
#

[Possible Issue] - Prefetch Not Triggering for Link in Dev

hushed galleon
#

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>
#

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

woven vale
#

xd

hushed galleon
#

Nice!

tropic idolBOT
#
If your issue is resolved, please help by doing the following two steps:
  1. 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.
  2. 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!
woven vale
#

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...

▶ Play video
#

i didnt do much, but thank you 💜

hushed galleon
#

You had /solved on speed dial, that still counts! 😄

woven vale
#

ah, that's nothing, have a nice one!

woven vale
#

kinda not very kind tho... 😭

hushed galleon
#

It‘s just a water gun

#

No emoji were hurt

woven vale
#

in my opinion, this is the perfect phrase to close an issue, should be automatically closed by bots if someone types it... 😂

#

using zen since two weeks, having mixed feelings but will stay since I came from arc...