chrome 应用权限 "unlimitedStorage" 是否已弃用?

is chrome app permission "unlimitedStorage" deprecated?

我在 google 手册 (https://developer.chrome.com/apps/offline_storage#persistent) 中读到:

"You can ask for the unlimitedStorage permission in the manifest file for an app or extension. At installation, the user is informed of permissions required by the app or extension. By proceeding with the installation, the user implicitly grants permission for all pages whose URLs are listed in the manifest.json file."

然而,如果我的清单文件中是否有 "unlimitedStorage",安装时的权限信息没有区别。此外,我的应用程序缓存没有被授予任何超过几 MB 的 space,即使是那样。

However there is no difference in the permissions information upon installation if I have "unlimitedStorage" in my manifest file or not.

并非所有权限都会生成用户可见的警告。 unlimitedStorage 被默默授予 - 如果您提出要求。

App Cache,然而,作为一种技术弃用。 unlimitedStorage适用于各种存储机制,但引用从文档中可以看出它从未应用于 App Cache。不过我不是 100% 确定。

此外,观察:您在多个问题中说您正在使用 Chrome 应用程序;但是,您的应用程序 "shell" 所做的只是将网站包装在 <webview> 中。您应该指定这一点,因为应用了一组不同的规则(它不是应用程序代码,它是 Web 代码 运行 在不完全 Chrome 的东西中)。

此外,来自文档:

Note: Web storage APIs like LocalStorage and SessionStorage remain fixed at 5 MB.

由于您的 "app" 只是网络代码,因此似乎适用此限制。您也许应该研究更新的网络存储技术(例如 Service Worker 缓存)。