444 Views
The other day, the following JavaScript error starting showing up in one of our logs, "QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota." After a bit of debugging, it turned out that this was the error that Safari throws, when running in Private Mode, if you try to store data using the localStorage API. While this error was easy to fix (it was actually a bug in our code), it got me thinking about using localStorage in an AngularJS application; and, why there are various reasons that it would be best to encapsulate such an API.