gpt4 book ai didi

javascript - session 之间是否可以在浏览器中存储超过 100 MB 的数据?

转载 作者:行者123 更新时间:2023-11-30 20:26:12 25 4
gpt4 key购买 nike

我们可以在浏览器中保留多少数据,以便我们可以在关闭/重新打开浏览器后再次访问这些文件?

LocalStorage seems to允许 ~ 5 或 10 MB(取决于浏览器)。

其他系统可能可用(例如 IndexedDB),详见 here , 但它看起来很复杂。

问题:是否有一种简单易用的技术(至少适用于 Chrome+Firefox,如果完全跨浏览器,移动和桌面则更好)允许存储超过 100MB(最多500MB)?

用例:一个允许使用高质量样本(比如 150 MB 音频样本)弹奏钢琴的网站,并避免我们每次打开页面时都必须重新下载数据。

PS:我最好寻找不需要安装扩展程序或浏览器插件的解决方案。

最佳答案

是的!

正如评论中提到的那样,IndexedDB 是必经之路。 PouchDB 有一个很好的 FAQ关于不同浏览器之间的存储限制。

Though Firefox has no upper limit besides disk space, if your application wishes to store more than 50MB locally [In IndexedDB], Firefox will ask the user using a non-modal dialog to confirm that this is okay.

Android works the same as Chrome as of 4.4+ (IndexedDB), while older versions can store up to 200MB (WebSQL).

并且来自 Chrome webpage.

Temporary storage is shared among all web apps running in the browser.{#It is also shared across all offline APIs, such as App Cache, IndexedDB, and File System. However, it does not include web storage APIs like Local Storage and Session Storage, which still has a limit of 5 MB per origin.#} The shared pool can be up to 1/3 of the of available disk space. Storage already used by apps is included in the calculation of the shared pool; that is to say, the calculation is based on (available storage space + storage being used by apps) * .333 .Each app can have up to 20% of the shared pool. As an example, if the total available disk space is 60 GB, the shared pool is 20 GB, and the app can have up to 4 GB. This is calculated from 20% (up to 4 GB) of 1/3 (up to 20 GB) of the available disk space (60 GB).

关于javascript - session 之间是否可以在浏览器中存储超过 100 MB 的数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50895529/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com