- pushState is only used for overriding the default behavior, mostly to keep the url bar in sync with changing client state
- pushState pollutes the browsers history
- users have a mental model of how many steps/clicks they performed on a site and expect that an equal number of clicks on the back button brings them back to the beginning
- users are upset if that expectation is not matched
The site should not have control over the users history in the first place but for SPA it's necessary to achieve the expected behavior. But the browser should make sure that it's not misused. In the same way that pop-ups are blocked outside of whitelisted event listeners to prevent a website from polluting your screen, pushState should be blocked to prevent history pollution.
Reminder from the HackerNews guidelines
> Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith.
I this what the original meant is that this implementation here is flawed. Once you are on the website, the back button won't bring you back to Hacker News ... ever. Even spamming the back button, you'll get stuck on the redirection to /directions which is annoying and definitely broken. This kind of redirection loops should be forbidden.
I have back/forward buttons on my mouse and I use those. Why would I move the mouse to click an in-app navigation button instead?
On phones, the native ‘back’ button is vastly more easy to tap than searching for where the designer placed their button this time and then likely reaching for the farthest corner of the screen, opposite of where my thumbs are. So much so that I get surprised and annoyed when a page that has fullscreen-y dialogs doesn't close them on ‘back’ but returns me to another page instead.
On desktop, personally for me at least one of the hands is usually on the keyboard in the proximity of ‘backspace’, which is again a no-brainer to mash. So the same consideration applies.
I've been trying iOS for the last couple of months, and especially initially that back button was one of my most missed features; it still annoys me, I've just stopped expecting it.