← Back to team overview

oxide team mailing list archive

Saving/restoring webviews across sessions

 

Hi,

I’m working on adding support for session save/restore to the webbrowser
app in Ubuntu Touch.

The first iteration will be somewhat naive and will only restore the
current URL for each open tab (no navigation history, no current scroll
offset, no nothing). This approach has the advantage of being implementable
without changes in oxide, which fits well our aggressive time constraints
for now.

In the future we’ll want to implement a much more clever session restore
mechanism, where navigation history and current scroll offset are being
restored as well (any other interesting parameters we should save and
restore?).

This will require some work in oxide to allow instantiating a WebView with
saved data, I suppose similar to what is done today when passing a
OxideQNewViewRequest at construction time. We’ll also need an API to save
the navigation history (and scroll offset, but that’s easy) to a format
that can be persisted (not sure if the persistence itself should be built
in oxide, or should be left up to the embedder). Does that make sense?

I haven’t thought much of what the API would look like yet, suggestions and
comments are welcome!

Cheers,

 Olivier

Follow ups