-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only preload link if the URL differs from current page (#12773)
fixes #10234 By avoiding preloading pages where the URL pathname and search params (the load ID) are unchanged, we also avoid mistakenly caching navigation results for hash URLs. Currently, these are ID'd the same as URLs without hashes, causing navigation to lose track of the current URL (hence the original issue). This should be a good solution because: - if we're on already on the page we don't need new load results for it. - even if the load results are suppose to be different for the same URL, clicking on a link that leads to the exact same URL already does nothing.
- Loading branch information
1 parent
5f1de9f
commit 571f731
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
fix: only preload links that have a different URL than the current page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters