Next.js Discord

Discord Forum

Redirect to external instead of pre-fetch after clicking an external link

Answered
Muscovy Duck posted this in #help-forum
Open in Discord
Avatar
Muscovy DuckOP
I have a peculiar bug with NextJS 13.4.12 with the next/link component.

* In production (npm run build && npm run start)
* I have a <Link /> that is pointing to an external link
* If I click this link and come back to previous URL, if I scroll down the page, I get automatically redirected to the previous external link that I click
* I have the impression that this is due to prefetching of the Link component that redirects me instead of prefecthing

Any idea on what might cause this issue?
Answered by Risky did start the fire šŸ™ƒ
firstly, can you try updating to latest version... (13.4.19 is the latest)
View full answer

5 Replies

Avatar
Risky did start the fire šŸ™ƒ
firstly, can you try updating to latest version... (13.4.19 is the latest)
Answer
Avatar
Muscovy DuckOP
Oh right will try right away
Avatar
Muscovy DuckOP
Noice, seems to be doing the trick āœØ
Any idea if this was a known bug?
Avatar
Risky did start the fire šŸ™ƒ
well it is a lot of versions, so it could be (but i dont know)
Avatar
Muscovy DuckOP
Thx!