Skip to content

Cancel sync request on popstate event#2429

Merged
pascalbaljet merged 4 commits intomasterfrom
cancel-sync-request-on-popstate
Jul 11, 2025
Merged

Cancel sync request on popstate event#2429
pascalbaljet merged 4 commits intomasterfrom
cancel-sync-request-on-popstate

Conversation

@pascalbaljet
Copy link
Copy Markdown
Member

This PR fixes a navigation issue that happened when a user went back in their browser history while a new page was still loading.

Previously, if a user navigated from /page1 to /page2, then clicked a link to /page3 (which is slow), and immediately pressed the browser's back button, /page1 would appear but the request to /page3 would still be running. Once finished, it would show /page3.

Now when a user goes back in history (while a new page is still loading), all pending (sync) requests are cancelled.

@pascalbaljet pascalbaljet marked this pull request as ready for review July 9, 2025 15:51
@pascalbaljet pascalbaljet changed the title Cancel sync request on popstate Cancel sync request on popstate event Jul 9, 2025
@pascalbaljet pascalbaljet merged commit f9addfd into master Jul 11, 2025
8 of 11 checks passed
@pascalbaljet pascalbaljet deleted the cancel-sync-request-on-popstate branch July 11, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant