From: James Burke <[email protected]>
Subject: Re: [b2g] Session Restoring of WebApps
Date: Thu, 27 Mar 2014 11:44:50 -0700

> 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
> 

I suggest to let webapp itself to decide if saving & restoring states.
For B2G, sysapp decides to restoring a session or not while the user
revisiting an app.  For Firefox, it is brower to make a decision.

So, we need a way (an API) that sysapp to signal the platform if to
save and restore session data for an app while the sysapp launch the
app.

> James
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to