[PWA] DOMException: Quota exceeded

Since I have activated the Service Workers in my app, often when I debug (ionic serve) I get the following error in the Chrome debugger console (if I don’t do stuffs for a while or sometimes after rebuild):

 Uncaught (in promise) DOMException: Quota exceeded.

Should I be concerned about this? Do you face that too?


Ok so this error popup probably because the 5mb limit of cache of Chrome for service worker is reached. Not sure if I cache too much or if too much is cached because the server (ionic serve) restart after I do modifications which are then cached…

Thanks for running into these things… so I don’t have to :wink: You’re the explorer we need.

1 Like

Hahaha not sure that I’m the right explorer :joy:

About this issue not sure it’s a side effect of the server restart but it might be the fact that network requests are cached too (maybe?) and since I display images from my S3 it reach the limits quickly

or both :wink:

Yep it look like it was my problem. The network requests are per default cached and because my app is a marketplace and I have to upload/display images from my S3, the max cache size (5 MB?) allowed by Chrome was quickly reached

To try to solve the issue I have modified service-worker.js in order to not cache the network requests. To do so I modified self.toolbox.router.default like the following

 self.toolbox.router.default = self.toolbox.networkOnly;

All the difference possibilities of sw-toolbox are documented in the API https://github.com/GoogleChromeLabs/sw-toolbox/blob/master/docs/api.md

P.S.: I gonna keep this issue open a bit till I’ll be sure that “server restart” was definitely not the problem

1 Like