public abstract class BrowserHistoryHelper
The point of this is to improve experience of browser history (back/forward/refresh buttons), but ensure there is no more redirects then necessary.
Ideally we want to:
- Remove all POST requests from browser history, because browsers don't automatically re-send them when click "back" button. POSTS in history causes unfriendly dialogs and browser "Page is expired" pages.
- Keep the browser URL to match the flow and execution from authentication session. This means that browser refresh works fine and show us the correct form.
on old browsers where "history.replaceState" is unsupported.