W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Storage Quota API

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 26 Sep 2011 16:43:59 -0700
Message-ID: <CA+c2ei-8AGDJW7vEcSJdrcpYOafKc2QppFFehUgEqpjPoRpOGA@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: public-webapps <public-webapps@w3.org>
Please don't use errorCallback/SuccessCallback. That's not used in any
other APIs that are part of the cross-browser web platform. Instead
return a request object on which events are fired.

Don't use enums as the syntax sucks in JS. Use strings instead. We're
making the same transition in a lot of other APIs.

There's also a problem in that Gecko treats IndexedDB as permanent
quota by default and Chrome treats it as temporary. Not sure how to
solve that problem.

You guys have this prefixed in your implementation for now, right?

/ Jonas

On Mon, Sep 26, 2011 at 2:49 PM, Charles Pritchard <chuck@jumis.com> wrote:
> Though unstable, Chromium via WebKit has introduced an API for working with
> storage quotas:
>
> https://groups.google.com/a/chromium.org/group/chromium-html5/msg/5261d24266ba4366
>
> In brief:
>
>  void queryUsageAndQuota(
>      unsigned short storageType,
>      optional StorageInfoUsageCallback successCallback,
>      optional StorageInfoErrorCallback errorCallback);
>  // Requests a new quota.  Requesting a larger quota may require user's
>  // explicit permission via UI prompting / infobar.
>
>  void requestQuota(
>      unsigned short storageType,
>      unsigned long long newQuotaInBytes,
>      optional StorageInfoQuotaCallback successCallback,
>      optional StorageInfoErrorCallback errorCallback);
> };
>
>
> This API works across all storage types except localStorage, as localStorage
> is unique.
>
> It spans IndexedDB, FileSystem, AppCache and for those that are carrying it,
> WebSQL.
>
>
> -Charles
>
>
Received on Monday, 26 September 2011 23:44:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT