服务工作者缓存存储的大小限制是多少? [英] What's the size limit of Cache Storage for Service Worker?

查看:145
本文介绍了服务工作者缓存存储的大小限制是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本地存储的大小限制为5M,当我在Service Worker中使用时,是否有任何缓存存储限制?

The size of Local Storage is limit to 5M, and is there any limit of Cache Storage when I used in Service Worker?

推荐答案

截至2016年8月15日,Addy Osmani 已发布

As of Aug 15 2016, Addy Osmani posted:


您可以存储多少钱?在Chrome和Opera中:您的存储空间为
来源(而不是每个API)。两种存储机制都会存储数据
,直到浏览器配额为止到达了。应用可以查看他们使用配额管理API的额外
配额。 Firefox:没有限制,但
将在存储50MB数据后提示。移动Safari:最大50MB,桌面
Safari:无限制(5MB后提示),IE10 +最大250MB,
提示10MB。 PouchDB 跟踪 IDB存储行为。面向未来:
对于需要更多持久存储的应用,请参阅
上正在进行的工作耐用存储

How much can you store? In Chrome and Opera: Your storage is per origin (rather than per API). Both storage mechanisms will store data until the browser quota is reached. Apps can check how much quota they’re using with the Quota Management API. Firefox: no limits, but will prompt after 50MB data stored. Mobile Safari: 50MB max, Desktop Safari: unlimited (prompts after 5MB), IE10+ maxes at 250MB and prompts at 10MB. PouchDB track IDB storage behavior. Future facing: For apps requiring more persistent storage, see the on-going work on Durable Storage.

其中每个来源意味着像localStorage这样的API会与之共享存储空间API就像服务工作者Cache。

Where per origin means that API's like localStorage would be sharing storage space with API's like the service worker Cache.

这篇关于服务工作者缓存存储的大小限制是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆