Skip navigation
"How can I reduce prefetching (to optimize hosting bill) without sacrificing navigation speed too…
0:00 / 0:30

"How can I reduce prefetching (to optimize hosting bill) without sacrificing navigation speed too…

Alex Sidorenko

@asidorenko_35K followers

Visit on X
930 likesDownloadOriginal post

102,871 views

"How can I reduce prefetching (to optimize hosting bill) without sacrificing navigation speed too much in Next?" Try prefetching on hover

10 Comments

Comments from the original post on X (Twitter)

  • Alex Sidorenko's profile picture

    @asidorenko_

    Code example in the docs (scroll a bit to the code block)

    18 likes

  • Brad Larson's profile picture

    @followbl

    for the bold, nextjs has an experimental feature - unstable_dynamicOnHover I have a link component in my apps that I import everywhere, so this was a one line change for me (dont forget to set th)e feature in your next config as well 😺

    21 likes

  • Alex Sidorenko's profile picture

    @asidorenko_

    Nice! TIL

    2 likes

  • 3IMAD's profile picture

    @3IMXXD

    or use By predicting cursor motion, this library prefetches elements ahead of time.

    13 likes

  • Alex Sidorenko's profile picture

    @asidorenko_

    Yep, this one in todos for future vids, looks very interesting

    1 like

  • Tom Watkins's profile picture

    @TomWatkins1994

    Always surprises me this isn't the default. I quite like how @tannerlinsley links work with user intent

    3 likes

  • Adam M's profile picture

    @adamaoc

    Oh that’s nice

    2 likes

  • Muperdev's profile picture

    @BehEvans

    oh, never thought about it, damn I love it man! gonna swtich my links to hoverOnPrefetch

    2 likes

  • Yosuva Rajendran's profile picture

    @Yosuva20

    nice one

    1 like

  • D.E's profile picture

    @DE07358

    Should be the default behaviour tbh

    1 like