aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/api/storagemanager/estimate/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/conflicting/web/api/storagemanager/estimate/index.html')
-rw-r--r--files/zh-cn/conflicting/web/api/storagemanager/estimate/index.html104
1 files changed, 104 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/api/storagemanager/estimate/index.html b/files/zh-cn/conflicting/web/api/storagemanager/estimate/index.html
new file mode 100644
index 0000000000..10a5a7eba5
--- /dev/null
+++ b/files/zh-cn/conflicting/web/api/storagemanager/estimate/index.html
@@ -0,0 +1,104 @@
+---
+title: StorageEstimate
+slug: conflicting/Web/API/StorageManager/estimate
+translation_of: Web/API/StorageEstimate
+original_slug: Web/API/StorageEstimate
+---
+<div>{{securecontext_header}}{{APIRef("Storage")}}</div>
+
+<div> </div>
+
+<p><strong><code>StorageEstimate</code></strong> 提供对你的域名或Web app的数据存储空间总量和已用量的估计值,该对象实例由{{domxref("StorageManager")}}的{{domxref("StorageManager.estimate", "estimate()")}} 方法返回的{{jsxref("Promise")}}返回.</p>
+
+<p>这些值仅为估计值有多种原因,既有对性能的考虑,也有防止将其作为指纹(fingerprinting)的目的.详情请参看属性.</p>
+
+<h2 id="属性">属性</h2>
+
+<p><em>该对象目前总是同时包含以下两个属性.</em></p>
+
+<dl>
+ <dt>{{domxref("StorageEstimate.quota", "quota")}} {{securecontext_inline}}</dt>
+ <dd>用户设备为你的域名或Web app预留的存储空间总大小,且该大小为估计值.虽然实际上可能有比这更多的存储空间,但这时你不应使用那多余的部分.</dd>
+ <dt>{{domxref("StorageEstimate.usage", "usage")}} {{securecontext_inline}}</dt>
+ <dd>你的域名或Web app已经使用的存储空间大小,且该大小为估计值.剩余可用空间请综合quota属性计算.</dd>
+</dl>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Storage', '#dictdef-storageestimate', 'StorageEstimate')}}</td>
+ <td>{{Spec2('Storage')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Microsoft Edge</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(55)}}</td>
+ <td>{{CompatGeckoDesktop(57)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatOpera(42)}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android Webview</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatChrome(55)}}</td>
+ <td>{{ CompatGeckoMobile(57)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatOperaMobile(42)}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="相关链接">相关链接</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/API/Storage_API">Storage API</a></li>
+ <li>{{domxref("StorageManager")}}</li>
+ <li>{{domxref("StorageManager.estimate()")}}</li>
+ <li>{{domxref("NavigatorStorage.storage", "navigator.storage")}}</li>
+</ul>