Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the size limit of Cache Storage for Service Worker? [duplicate]

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

like image 237
abu Avatar asked Jul 06 '16 07:07

abu


People also ask

What is limit cache size?

The maximum theoretical cache size is 2 GB. The size of cache you can specify is limited by the amount of physical memory and paging space available to the system. The shared class cache consists of memory mapped files that are created on disk and remain when the operating system is restarted.

Should service worker be cached?

Service worker caching strategies and use cases #It's preferable to serve the fresh content. However if the network fails or is unstable, it's acceptable to serve slightly old content. It's okay to serve cached content right away, but updated cached content should be used in the future.

Can service workers access cache?

# Access to a JavaScript-driven caching APIThe Cache interface can be accessed within the service worker scope and within the scope of the main thread.

What is the default Chrome cache size?

This is because once the cache is full it will delete information from it to make way for new cached data. The following provides instructions for finding disk cache size values for: The major browsers set the default disk cache size too small: Firefox is 50MB, IE is 8 to 50MB, Chrome is < 80MB, and Opera is 20MB.


1 Answers

As of Aug 15 2016, Addy Osmani posted:

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.

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

like image 131
David Scales Avatar answered Nov 14 '22 21:11

David Scales