<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000099">
In the W3C spec for localStorage
<a class="moz-txt-link-freetext"
href="http://dev.w3.org/html5/webstorage/#the-localstorage-attribute">http://dev.w3.org/html5/webstorage/#the-localstorage-attribute</a>
is said
to present it (the persistent storage) the same way as cookies.<br>
<br>
There were suggestion to throw DOM_QUOTA_ERROR exception when storing
to localStorage in case when cookies are in a session-only mode for a
host/page. It makes sense from several reasons. This way web apps may
decide or inform user about situation that the page cannot store to
localStorage while there is no way for the page to figure out that
cookies mode is session-only and web app still may freely read from the
storage.<br>
<br>
My suggestion is then:<br>
- allow a page to obtain valid localStorage object<br>
- allow read from it<br>
- throw DOM_QUOTA_ERROR when storing to it<br>
<br>
But I don't know what to do in case of call to clear() and removeItem()
methods. It would exposes the cookie behavior again when it
fails/throws.<br>
<br>
-hb-
</body>
</html>