Use Javascript to go to an "external" page and handle "back" correctly
I would like to know how to change pages and go back in javascript in a way that is the same as:
- <a href="someplace.html#somehash" rel="external">Go There</a>
- <a data-rel="back">Go Back</a>
What I've found is that if I do everything in HTML (which I can't in the situation I have now), everything works as I would expect.
If I try to just do a $.mobile.changePage('somplace.html'), not all the jQueryMobile screens get loaded. I tried reloadPage=true, but that didn't help.
If I do a window.location="someplace.html#somehash" to go to the page, everything loads right, but if I click a "back" link, it takes me to previous-page.html, but not previous-page.html#last-screen.
If I look at $.mobile.urlHistory when I'm in someplace.html, it doesn't have any of the history from the previous page.
I assume there are some "secret" (not documented and well obscured in the code) options to set in $.mobile.changePage() to do that, but I can't figure it out at all.
So, I'm stumped. What is this magic?
Any help would be mucho appreciado.