Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Following a prefetched link will fail if switching quickly back and forth #1667

Closed
ehrencrona opened this issue Dec 11, 2020 · 0 comments · Fixed by #1668
Closed

Following a prefetched link will fail if switching quickly back and forth #1667

ehrencrona opened this issue Dec 11, 2020 · 0 comments · Fixed by #1668

Comments

@ehrencrona
Copy link
Contributor

ehrencrona commented Dec 11, 2020

Describe the bug
If, starting from a page A you click on a link to a page B and then - before B loads - hovering over a preloading link to A, then you will not be able to follow the link to A once B finishes loading. The URL will update, but the previous page will remain active.

To Reproduce
In https://github.com/ehrencrona/sapper-prefetch-caching-repro is the Sapper template but with a preload for the home page and for the blog page that takes 2 s to execute.

Go to /blog and reload. Then in quick succession click home, blog and home again. Wait two seconds. Now click blog. The URL will update but you will still be on the home page.

Expected behavior
I expect the blog to render.

Severity
Moderate; occurs on real public sites when preloading is slow.

@ehrencrona ehrencrona changed the title Following to a prefetched link will fail if switching quickly back and forth Following a prefetched link will fail if switching quickly back and forth Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant