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

storageQuota 特性为 Navigator 接口在 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.

规范

规范 状态 注释
Quota Management API
The definition of 'storageQuota' in that specification.
过时 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
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

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

弃用。不要用于新网站。

弃用。不要用于新网站。

元数据

  • 最后修改: