W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2009

[whatwg] Web Storage: apparent contradiction in spec

From: Jeremy Orlow <jorlow@chromium.org>
Date: Tue, 25 Aug 2009 14:16:51 -0700
Message-ID: <5dd9e5c50908251416r256ae3f0o3f815fe61186254b@mail.gmail.com>
On Tue, Aug 25, 2009 at 2:09 PM, Brady Eidson <beidson at apple.com> wrote:

> On Aug 25, 2009, at 1:38 PM, Linus Upson wrote:
>
> It is important that all local state be treated as a cache. User agents
> need to be free to garbage collect any local state. If they can't then
> attackers (or the merely lazy) will be able to fill up the user's disk. We
> can't expect web sites or users to do the chore of taking out the garbage.
> Better user agents will have better garbage collection algorithms.
> It would be better to remove section 4.3.
>
>
> I disagree.
> One key advantage of LocalStorage and Databases over cookies is that they
> *do* have a predictable, persistent lifetime, and the browser is *not*
> allowed to prune them at will.
>
> User agents are perfectly allowed to not allow new items to go into
> LocalStorage or Database Storage once some quota is met, or if the user has
> disabled it for that domain, or disabled it altogether, or if the disk is
> filling up, or any other number of circumstances.
>
> But once the data is stored, it should be considered user data - as
> "sacred" as a user's file on the file system.
>

What happens when your computer blows up?  When you switch browsers?  What
about when you re-install your OS?  etc

What about mobile devices where 5mb is actually a lot of space?  What
happens when a malicious site fills up all of your localStorage space?
 You're saying the UAs should not be free to have heuristics about what to
delete?  What do they do then?

Note this exact point has been discussed on this list before, and IIRC the
outcome was that localStorage should be treated like cookies: we'll try to
keep them around, but the app should be resilient to them going away.

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090825/a108a0cc/attachment-0001.htm>
Received on Tuesday, 25 August 2009 14:16:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:51 UTC