[whatwg] Google Gears and HTML5

Chris Prince cprince at google.com
Fri Jun 1 13:51:56 PDT 2007

> > It's not clear what the Gears ManagedStore does
> > if it gets a 404 or some other error during an update.
> I believe the update is made atomic to the web app:
> http://code.google.com/apis/gears/api_localserver.html

That is correct.  Gears starts serving a manifest's resources only
when everything has been successfully downloaded.  If it gets a 404
it will try again later.

> > flip to the new version --- more than likely while the app is
> > in the middle of loading. Sure, this could happen normally if
> > I hit the site in the middle of the night at the switchover,
> > but ManagedStore makes this uncommon case common.
> We've brought up the same problem. [snip]
> I don't think this problem is fundamental.

I agree, I would like this to be the uncommon case once again.
As Maciej said, there are several ideas for fixing it.  We are
definitely open to suggestions.

The solution should avoid relying on application code.  Or more
specifically, developers must always be able to fix a "stuck" app
with a server-side push.

The solution should also avoid any extra delay at request time.

> requiredCookie ... suppose you have two different gmail accounts
> with preferences set to different languages.

Yes, that's exactly what 'requiredCookie' is for.  Some applications
need to serve different content for a given URL.  Today, they often
make that decision based on the user's cookie.  In an earlier design
we had a custom object for tracking sessions, but this was a burden
on developers.

> BTW the Gears docs don't say what happens when a load matches in
> multiple stores, possibly by having multiple cookies...)

Gears returns an error when you first try to setup an ambiguous
capture.  For example, you can capture url U for requiredCookie=A
and for requiredCookie=B.  But you cannot capture U with and without
a requiredCookie value, or in two different stores.

> query parameters in JAR URIs are ignored, so
> jar: http://foo.com/foo.jar!/query.html?bar=baz just loads
> jar: http://foo.com/foo.jar!/query.html

Gears lets developers do something similar, by setting the
"ignoreQuery" parameter to "true" for any manifest resource(s).

More information about the whatwg mailing list