- Accessing
localStorage or sessionStorage objects can throw SecurityError DOMException
- "Set" operations can throw
QuotaExceededError DOMException
localStorage and sessionStorage can be null (not sure if this is per spec, but Safari, Mobile Safari, and Chrome Mobile WebView definitely do this)
Reference: https://html.spec.whatwg.org/multipage/webstorage.html