#prefetch false not working

1 messages · Page 1 of 1 (latest)

robust arch
#

prefetch false not working in link component

urban surgeBOT
#

Hi @robust arch. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

There are several issues reported on GitHub regarding the prefetch={false} attribute in the Link component of Next.js not working as expected.

  1. In one issue (https://github.com/vercel/next.js/issues/55217), users reported that when using route groups with Link component and prefetch={false}, clicking the link causes a hard page refresh. Some users suggested using the <a> tag instead of <Link>, while others mentioned that the issue started occurring after adding internationalization.

  2. Another issue (https://github.com/vercel/next.js/issues/59529) was reported where the default value of the prefetch property in the Link component was not working as expected. The user expected the prefetch to work even when the prefetch property was not specified in the Link component, as per the Next.js documentation. However, it was pointed out that the behavior was changed as per this PR (https://github.com/vercel/next.js/pull/48383).

  3. In a third issue (https://github.com/vercel/next.js/issues/50412), it was reported that the Link component is not prefetching on hover if prefetch={false} is given, contrary to the documentation.

  4. In a fourth issue (https://github.com/vercel/next.js/issues/43118), a user reported that the Link component with prefetch={false} was causing a full page refresh.

These issues are still open at the time of writing, so it seems that there might be some bugs related to the prefetch={false} attribute in the Link component in Next.js. You might want to keep an eye on these issues for any updates or workarounds.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: