I want to make sure my code handles the QuotaExceededError
with IndexedDB properly, I'd prefer not torturing my SSD to do so.
Is there any way to set a storage limit (like to say 5 MB) in the developer tools or browser settings?
In Chrome, you can launch the browser with --user-data-dir pointing at a smaller volume, e.g. via tmpfs
.
Chrome doesn't have devtools support for such testing, but it's on the wish list.
As of today you can open DevTools, go to the Application Panel and check the Simulate custom storage quota
label and then provide the maximum amount of MB that can be stored by IndexedDB.
Chrome DevTools Application Panel Screeshot
I've used a VM with a small hard drive. That's not ideal obviously, so I hope someone suggests a better answer!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With