Hi James, I will try popState api this weekend to test out this theory. Well, if we are using Routers in the app, then it should be fairly easy to drop the user to the previous state. The question is what should be use to store data that cannot be risked stored in URL, like oAuth key.
Thanks *Prateek Jadhwani* www.prateekjadhwani.com On Thu, Mar 27, 2014 at 2:44 PM, James Burke <[email protected]> wrote: > On Thu, Mar 27, 2014 at 8:33 AM, Thinker K.F. Li <[email protected]> > wrote: > > The problem is, I know, we are unlikely to encourage people to use > > sessionStorage or cookie as a synchronize API. Is there any other > > option? > > I would prefer to use the history/popstate APIs and see apps change > URLs for each state, storing URL state via pushState[1]. > > This might require some system or platform changes: > > * A way to signal to the system, "unless explicitly triggered via an > activity, save my pushState states and restore to last URL on load". > > * If that signal is true, then the platform saves off pushState state > and URL history, and restore it once launching the app again. > > * Looking at the docs[1], it might be good to have firefox emit a > popstate on load, to get the URL state back. > > [1] https://developer.mozilla.org/en-US/docs/Web/Reference/Events/popstate > > James > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g >
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
