Per public discussion on public-webapps, it'd be great to support the unified quota API (vendor-prefixed one) that allows webapps to query the current origin's usage/quota or request a new storage quota for the requesting origin across various storage APIs (like IndexedDB, SQL DB and FileSystem API). http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0346.html This is an umbrella bug for supporting/implementing unified quota API. Related issue: bug 53983
The quota API update: We have added following app-facing APIs to WebKit. Current chromium is the only embedder that implements this API. In the latest chromium port SQL DB and FileSystem API are under the unified quota management. There's an ongoing work to put Appcache and IndexedDB under quota management too. -------------------------------------------------------------------- Window implements QuotaStorageEnvironment; [NoInterfaceObject] interface QuotaStorageEnvironment { // Note: the attribute name is prefixed by 'webkit' readonly attribute StorageInfo webkitStorageInfo; }; interface StorageInfo { const unsigned short TEMPORARY = 0; const unsigned short PERSISTENT = 1; // Queries the current quota and how much data is stored for the host. void queryUsageAndQuota( unsigned short storageType, optional StorageInfoUsageCallback successCallback, optional StorageInfoErrorCallback errorCallback); // Requests a new quota. Requesting a larger quota may require user's permission and the embedder // browser may show some user notification UI to prompt the user. void requestQuota( unsigned short storageType, unsigned long long newQuotaInBytes, optional StorageInfoQuotaCallback successCallback, optional StorageInfoErrorCallback errorCallback); }; [NoInterfaceObject, Callback=FunctionOnly] interface StorageInfoUsageCallback { void handleEvent(unsigned long long currentUsageInBytes, unsigned long long currentQuotaInBytes); }; [NoInterfaceObject, Callback=FunctionOnly] interface StorageInfoQuotaCallback { void handleEvent(unsigned long long grantedQuotaInBytes); }; [NoInterfaceObject, Callback=FunctionOnly] interface StorageInfoErrorCallback { void handleEvent(DOMCoreException error); }; --------------------------------------------------------------------