I’m using firefox.
- I open a new tab
- I go to: https://github.com/git/git
- I click on the file
COPYING
- I click the browser back button
Now I am back at an empty tab, instead of the main code page.
It is very annoying.
How can I either entirely prevent github (and other sites) overriding my browser back button, or implement a workaround when they do?
2
Answers
Despite the back button not working, the history stack seems to be unchanged. Executing
history.go(-1)
in the console works, so I wrote a greasemonkey script to bind new hotkeys (Shift Ctrl [, Shift Ctrl ]):Still hoping there is a way to make the back button work directly.
After much experimenting, I found this non-default config setting:
which led me to this relevant bug report:
I have no recollection of setting that option but resetting it to default (
false
) immediately made the location history reappear when right-clicking the back button.It’s slightly odd that only github was affected (but I can see they use javascript that mentions things like "poping a state from the history stack" and "prevent our state from getting out of sync with the browser’s history stack", so …).
Thanks to @0stone0 for pointing me in the right direction.