| ▲ | riskable 5 hours ago | ||||||||||||||||
If you don't manage the history properly in your SPA, pressing the back button could take the user out of the app entirely. If you don't let web developers manage history/state like this, we'd be going back to the inefficient world of, "every forward/back movement loads a whole page." (With lots of unnecessary round trip messages between the client and server while the user waits for everything to load). Basically, the ability to manage history is a user-centric feature. It makes the experience better for them. | |||||||||||||||||
| ▲ | teo_zero 4 hours ago | parent [-] | ||||||||||||||||
> If you don't manage the history properly in your SPA, pressing the back button could take the user out of the app entirely. Yes. And that should be the default behavior: browser buttons should take you through the browser's history. If you keep a in-app state and want the user to navigate through it, you should provide in-app buttons. Nobody complains that the browser's close button quits the browser instead of the app it's showing, or that the computer's power button shuts down the whole OS and not only the program in the foreground. Users must be educated. If they have learned that left means "back" and right means "forward", that a star (sometimes a heart) means "remember this for me", and that an underlined checkmark means "download", then understanding the concept of encapsulation shouldn't be too much for them. | |||||||||||||||||
| |||||||||||||||||