What is the storage limit for a service worker?

前端 未结 5 1978
耶瑟儿~
耶瑟儿~ 2020-11-28 03:59

Most of the browsers provide localStorage with the storage limit of 5MB per domain. Are there such memory limits/constraints with respect to service workers?

I know

5条回答
  •  温柔的废话
    2020-11-28 04:31

    I'm not 100% certain, but I think you're limited entirely by what's available on the client machine. As in, there is no fixed upper limit

    If someone was running a beast of a machine and the browser was the only active application, then you'd most likely have plenty of storage available

    However, if it was an old limited machine that's barely chugging along; you'd have very little

    It depends entirely on what you're trying to do really. You should only really be using service workers to store things vital to your page/application working

提交回复
热议问题