使用今天最新版本的 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/