W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Quota API to query/request quota for offline storages (e.g. IndexedDB, FileSystem)

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Thu, 3 Feb 2011 12:32:32 +0000
Message-ID: <AANLkTikZkKhGA0YqGLDCST8+JLJ9Wz6YXCSY9fNy64JN@mail.gmail.com>
To: public-webapps@w3.org

>   interface StorageInfo {

Should probably be QuotaInfo or even QuotaManager ? Storage can and
will be confused with Web Storage.

>    // storage type
>     const unsigned short TEMPORARY = 0;
>     const unsigned short PERSISTENT = 1;

Only two values seem not enough for me and I disagre with the
nomenclature. Would be betteer to have
that would create artificial dependencies with the other specs, so it
would be better if "type" passed to the query and request functions to
just be an opaque string which would allow any offline storage spec to
refer to this one instead and specify a type of their own like
"localStorage", "sessionStorage", "indexedDb".

>     // To query how much storage is available and currently in use.
>     void queryUsage(unsigned short storageType,
>                     UsageCallback usageCallback);

Given that quota values are usually just preferences, hence
lightweight enough, this function should be sync for the sake of

General note: using bytes as measure is probably overkill. While I
doubt localStorage would even exceed a couple megabytes, making an
entire e-mail account available offline with indexedDb or web sql db
could easily climb to a couple GBs. Perhaps kilobytes is better ?
Received on Thursday, 3 February 2011 13:17:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC