<div><i>Please, keep this on topic.  There's no point to rehashing <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-April/019238.html">http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-April/019238.html</a> or any of the other similar debates on private browsing and localStorage's persistence guarantees.</i></div>
<div><br></div><div>When in "private browsing" mode, WebKit should not write any data to the hard drive.  In addition, WebKit does not allow changes to localStorage that aren't going to be written to disk.  Currently, it returns a DOM_QUOTA_ERROR on setItem when private browsing is enabled, and silently fails for removeItem and clear.  The silent failures are obviously bad, but even the (ab)use of DOM_QUOTA_ERROR kind of bothers me.</div>
<div><br></div><div>Is there an exciting exception that'd work better to tell the script "the change failed because localStorage is currently immutable"?  If not, is there any chance it could be added to the spec?</div>
<div><br></div><div>Obviously only browser vendors that share WebKit's philosophy on localStorage's "guarantee" of persistence would actually use this, but I think it'd be far better than the current behavior.</div>
<div><br></div><div>Thanks,</div><div>Jeremy</div>