Recommended browser back button behaviour for SPA’s
Our company is building an SPA and we're having a discussion about the best behavior for the browser back button. The SPA is a management tool with a lot of tables and filters. Every time a filter is changed the URL parameters are updated to reflect the current state.
There are two sides to the argument of what the back button should do:
- One side thinks the back button should switch states. So every time a filter changes it should push the new state in the browser history.
- The other side thinks the back button should switch pages. So filter changes should be ignored and the browser should return to the previous page/view.
Both options have their pro's and cons. Is there a common view on what the back button should do?