Skip to content

Blowing up localStorage (or what happens when you exceed quota)

Updated: at 10:44 PM

Some strategies to detect and work around the size limitations of localStorage

Ray Camden writes “Based on some discussion earlier today on Twitter, I wanted to take a quick look at what happens when you exceed the quota limit in a browser’s LocalStorage system.”

In Chrome and Safari you get a DOMException named QuoteExceededError with code 22.

In Firefox you get a DOMException with name NS_ERROR_DOM_QUOTA_REACHED and code 1014.

IE throws no error but supports a remainingSpace property.

Read more from the source: Raymond Camden’s Blog