You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to store more than an origin's quota using IndexedDB, Cache, or OPFS, for example, fails with a QuotaExceededError exception.
Web developers should wrap JavaScript that writes to browser storage within try...catch blocks. Freeing up space by deleting data before storing new data is also recommended.
Therefore, we should add a try/except block on "save to cache" attempts, looking out for a QuotaExceededError and either:
Replace the oldest entry of the cache with the new one
Replace the less frequently used entry of the cache
or something else?
Component
portal
Code of Conduct
I agree to follow this project's Code of Conduct.
The text was updated successfully, but these errors were encountered:
Description
We should handle the case where we attempt to store new entries to the service worker's cache but it is full.
From the MDN docs:
Therefore, we should add a try/except block on "save to cache" attempts, looking out for a
QuotaExceededError
and either:Component
portal
Code of Conduct
The text was updated successfully, but these errors were encountered: