Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bookmarks & History APIs?

15 views
Skip to first unread message

Ben Francis

unread,
Mar 20, 2012, 10:56:27 AM3/20/12
to dev-webapi
Hi there,

I'm looking into implementing bookmarks and full history in Gaia. I
understand from https://developer.mozilla.org/en/Places that Firefox uses
the Places system to store and query this data. On Android I believe Fennec
uses Android's own storage system, which can be backed up.

Places seems like a sophisticated system which has been optimised for these
use cases, but it isn't exposed to content. When implementing a browser as
a web app, do you think we need new Web APIs for this, or should Gaia
implement its own bookmarks & history system, using IndexedDB for storage?

In other words, should bookmarks and history be part of the web platform,
or should they be implemented by apps?

Perhaps we should start by prototyping with IndexedDB and see how far we
can get?

Ben

--
Ben Francis
http://tola.me.uk

Justin Lebar

unread,
Mar 20, 2012, 11:04:31 AM3/20/12
to Ben Francis, dev-webapi
> In other words, should bookmarks and history be part of the web platform,
> or should they be implemented by apps?

In general, we should add something to the web platform if you can't
do it well (or at all) without platform support.

In this case, I can't think of any reason an app couldn't implement
bookmarks well IndexedDB. Can you?
> _______________________________________________
> dev-webapi mailing list
> dev-w...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-webapi

Ben Francis

unread,
Mar 20, 2012, 11:18:29 AM3/20/12
to Justin Lebar, dev-webapi
On Tue, Mar 20, 2012 at 3:04 PM, Justin Lebar <justin...@gmail.com>wrote:

> > In other words, should bookmarks and history be part of the web platform,
> > or should they be implemented by apps?
>
> In this case, I can't think of any reason an app couldn't implement
> bookmarks well IndexedDB. Can you?
>

I was initially concerned that building an "awesomescreen" might be
difficult because of the limited querying ability of IndexedDB, but I think
this can be done by creating indexes. Let's suck it and see!

Despite your warnings, I don't think I really appreciated quite how complex
this area is until I read those wiki pages :) But we can start simple.

Justin Lebar

unread,
Mar 20, 2012, 11:28:25 AM3/20/12
to Ben Francis, dev-webapi
fwiw, last time I checked, the awesomebar has no indexing to speak of.
It does a full table scan on every keystroke.

It's hard to build an index on the awesomebar, because it'll match
arbitrary portions of URLs. (E.g., "encan" will match
"kittencannon.com".) Lift this restriction and things get a lot
easier, but tokenizing URLs, particularly domains, is hard.

Chris Jones

unread,
Mar 30, 2012, 12:34:18 AM3/30/12
to Ben Francis, dev-webapi
----- Original Message -----
> From: "Ben Francis" <b...@krellian.com>
> To: "dev-webapi" <dev-w...@lists.mozilla.org>
> Sent: Tuesday, March 20, 2012 7:56:27 AM
> Subject: Bookmarks & History APIs?
>
> In other words, should bookmarks and history be part of the web
> platform,
> or should they be implemented by apps?
>

I agree with Justin.

In addition, bookmarks could be implemented by having the browser app create its own "store store", and use the apps API to "install" web page URLs. The browser app would enumerate the installed apps for its own UI. And when we want to bookmark a page as a homescreen icon, we'd want the browser app to instead install the app into a "main" store.

Cheers,
Chris

Ben Francis

unread,
Apr 3, 2012, 5:19:15 AM4/3/12
to Chris Jones, dev-webapi
On Fri, Mar 30, 2012 at 6:34 AM, Chris Jones <cjo...@mozilla.com> wrote:

> In addition, bookmarks could be implemented by having the browser app
> create its own "store store", and use the apps API to "install" web page
> URLs. The browser app would enumerate the installed apps for its own UI.
> And when we want to bookmark a page as a homescreen icon, we'd want the
> browser app to instead install the app into a "main" store.
>

This sounds interesting, but I don't quite follow. You're saying we could
use the mozapps API to store the URLs of bookmarks by creating two separate
storage buckets for apps? I didn't know this was possible. Could you
explain a little further?
0 new messages