StorageEstimate

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

 

StorageEstimate 提供对你的域名或Web app的数据存储空间总量和已用量的估计值,该对象实例由StorageManagerestimate() 方法返回的Promise返回.

这些值仅为估计值有多种原因,既有对性能的考虑,也有防止将其作为指纹(fingerprinting)的目的.详情请参看属性.

属性

该对象目前总是同时包含以下两个属性.

quota Secure context
用户设备为你的域名或Web app预留的存储空间总大小,且该大小为估计值.虽然实际上可能有比这更多的存储空间,但这时你不应使用那多余的部分.
usage Secure context
你的域名或Web app已经使用的存储空间大小,且该大小为估计值.剩余可用空间请综合quota属性计算.

规范

Specification Status Comment
Storage
StorageEstimate
Living Standard Initial definition.

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Microsoft Edge Opera Safari (WebKit)
Basic support 55 57 (57) ? ? 42 ?
Feature Android Webview Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 55 57.0 (57) ? 42 ?

相关链接

文档标签和贡献者

此页面的贡献者: hhxxhg
最后编辑者: hhxxhg,