In some example embodiments, a request for a navigation action is detected via a web browser during a pre-navigation state of a single page application, and a state object is persisted, with the state object comprising a dictionary property and an index property. The dictionary property comprises a list of all uniform resource locator (URL) fragments stored in a browser history, with the list of URL fragments comprising a pre-navigation URL fragment for the pre-navigation state and a post-navigation URL fragment for a post-navigation state. The pre-navigation state is navigated to within the web browser using the state object. Based on a detection of unsaved data, a navigation confirmation request is displayed within the recovered pre-navigation state of the single-page application using the pre-navigation URL fragment. The navigation confirmation request is configured to receive an indication of whether or not to perform the navigation action.