google-chrome - navigator.webkitPersistentStorage.requestQuota 是否适用于 IndexedDB?

标签 google-chrome local-storage google-chrome-app indexeddb persistent-storage

使用今天最新版本的 Android 版 Chrome,我可以使用 navigator.webkitPersistentStorage.requestQuota 请求持久性 IndexedDB 存储吗? ?

var requestedBytes = 1024*1024*1024; 

navigator.webkitPersistentStorage.requestQuota (
    requestedBytes, function(grantedBytes) {  
        console.log('we were granted ', grantedBytes, 'bytes');

    }, function(e) { console.log('Error', e); }
);

或者,是否 navigator.webkitPersistentStorage.requestQuota仍然只适用于FileSystem API ?

最佳答案

navigator.webkitPersistentStorage.requestQuota仅适用于沙盒文件系统 api。

您想要新的 navigator.storage.persist()适用于所有站点存储的 api。

https://developers.google.com/web/updates/2016/06/persistent-storage

关于google-chrome - navigator.webkitPersistentStorage.requestQuota 是否适用于 IndexedDB?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42355275/

相关文章:

javascript - 信息亭 Chrome 应用程序 : navigate to URL

google-chrome - Chrome 上的 Angular2 表格行组件以单列显示

javascript - Chrome 扩展 -> 执行脚本 : function call doesn' work

javascript - 本地存储与 Web SQL

javascript - 用户 :index is undefined?

google-chrome - 如何限制我的 Chrome 应用程序被多次打开(因此只有一个实例)?

javascript - Node 8.0 新符号并在 Number.prototype.toLocaleString() 的符号后添加空格

angularjs - 测试关闭 Protractor 间歇性失败的模式

javascript - 如何在HTML5网页中将数据保存在本地,这样我们就不需要一次又一次地从服务器获取?

google-chrome - 在 Chrome 应用程序中使用证书进行 SSL 客户端身份验证