admin管理员组文章数量:1334186
I have a Page 1 (Search Page) that contains links to Product 1 and Product 2 (Page 2).
Currently, I’m using the default prefetching behavior (prefetch={undefined} or null) for the links to Page 2.
There’s also a back button on Page 2 that should return the user to Page 1 without reloading it.
While this works correctly with router.back()
, I’ve noticed an issue on iPhone devices:
after navigating back and forth multiple times—specifically, from Page 1 to Page 2, then back to Page 1, and finally to a different product (Page 2) before returning to Page 1 again—on the fifth load of the Search Page (Page 1), it performs a full-page refresh.
This results in a broken user experience.
I suspect that this issue may be related to memory constraints due to router caching, which could be exceeded and causing the page to refresh.
Do you have any suggestions? If you need any further adjustments or specific details added, just let me know!
Next.js version: 13.4.12
本文标签:
版权声明:本文标题:app router - Aiming for smooth SPA behaviour in Next.js, but navigating back to previous Pages causes full page refresh - Stack 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742316779a2451974.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论