- From: Joćo Eiras <joao.eiras@gmail.com>
- Date: Thu, 3 Feb 2011 12:32:32 +0000
- To: public-webapps@w3.org
Howdy. > 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 LOCAL_STORAGE, SESSION_STORAGE, WEB_SQL_DBS, INDEXED_DB and so on. But 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 simplicity. 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