In jQuery mobile is it possible to check if history.back() would be a page in the application? If it isn’t a page in the application, then I want to direct to a specific page.
Example:
User clicks login from the home page and goes to login.html. The login is handled successfully and history.back() is called and the user goes back to the home page.
User enters at login.html. The login is handled successfully and since the user did not come from another page in the app, they are taken to account.html.
Problem solved by storing the redirect page.