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

Storage Quota API

From: Charles Pritchard <chuck@jumis.com>
Date: Mon, 26 Sep 2011 14:49:32 -0700
Message-ID: <4E80F36C.7020202@jumis.com>
To: public-webapps <public-webapps@w3.org>
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 21:50:00 GMT

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