Messes with back/forward history navigation
See original GitHub issueWhen I’m on GitHub in a source file (history index n
) and go back in chrome (n-1
), sometimes only the URL bar changes to the previous (n-1
) URL but the content stays the same (n
), when this extension is installed.
Then I have to reload or go back (n-2
) and forward (to n-1
) to get to that page (n-1
).
This shouldn’t happen, please fix it 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Chrome plans to save you from sites that mess with your back ...
When you hit the back button your browser goes back one URL in its history, which loads the redirect which bounces you forwards...
Read more >Using Router Events To Detect Back And Forward Browser ...
Even navigation events that are considering "going back" or "going forward" within the Browser's history are given a unique ID.
Read more >Browser back & forward and form autocomplete mess
Yes, as I see when we pushes url-s to the history, the browser stores them in the history list, but clicking on BACK,...
Read more >How to Navigate Forward and Backward in Chrome Android?
The only way to go back on my phone is tap the three dots, choose HISTORY and figure out which page you want...
Read more >navigation-api/README.md at main - GitHub
Navigating backward or forward through the history list via application-provided UI. Synchronizing application or UI state with the current position in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce.
It’s probably related to jquery.pjax, as it is used by GitHub itself, but also by Module Linker (so we can have the same navigation features of GitHub). The way I glued it into the code was somewhat hacky, because it doesn’t seem to do what I was expecting it to do (probably my misunderstanding), so I bet the answer lies there.
I need some help here, please.
The
return
is there to guarantee we don’t run the initialization function twice. But why would this initialization change the URL of the page?Maybe what’s happening is that when we press
Back
for some reason jquery.pjax fails to load the previous page, but does change the URL. Perhaps the first step to debug it would be to listen for their events.