QuotaExceededError

The error thrown when a write would take an origin over its storage quota.

In more detail

It is a DOMException, so check err.name to recognise it. localStorage.setItem throws it synchronously, so wrap writes in try...catch and degrade gracefully, for example by dropping old cached data.

Related terms

Taught in

References