How to get Back button working between remote and local jQuery Mobile pages?

此生再无相见时 提交于 2019-12-24 00:27:31

问题


I have a local jQuery Mobile project going (inside PhoneGap, thus file:// protocol) where I sometimes need to fetch external pages (using http://) from a server where the content too are jQM pages with almost identical markup (except for the content, which is generated from a CMS).

Setting $.mobile.allowCrossDomainPages to true gives me the page, and that is all right. Going Back, however, fails. I get stuck in a place where /www/index.html is not found on the server (like, doh, of course..). Is there a way to "remember" where I came from, taking me back to the local html page I originally came from?


回答1:


We just added a docs page on PhoneGap in jQuery Mobile for RC3 that should help you out quite a bit: http://jquerymobile.com/test/docs/pages/phonegap.html



来源:https://stackoverflow.com/questions/8137909/how-to-get-back-button-working-between-remote-and-local-jquery-mobile-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!