StorageQuota

这是 实验性技术
检查 浏览器兼容性表格 在生产中使用这之前。

storageQuota 特性为 Navigator interface of the Quota Management API provides means to query and request storage usage and quota information. You can get a reference to this interface using Navigator.storageQuota .

特性

StorageQuota.supportedTypes 只读
Returns a list of the available storage types.

方法

StorageQuota.queryInfo
返回 StorageInfo object containting the current data usage and available quota information for the application.
StorageQuota.requestPersistentQuota
Requests persistent storage for the requesting application and returns a Promise to an instance of StorageInfo . There is no guarantee that the requested space will be granted by the user agent.

规范

规范 状态 Comment
Quota Management API
The definition of 'storageQuota' in that specification.
Obsolete 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
StorageQuota
弃用
Chrome 14 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android 37 Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
queryInfo
弃用
Chrome 14 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android 37 Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
requestPersistentQuota
弃用
Chrome 14 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android 37 Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
supportedTypes
弃用
Chrome 14 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android 37 Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0

图例

完整支持
完整支持
兼容性未知
兼容性未知
弃用。不要用于新网站。
弃用。不要用于新网站。