<div class="gmail_quote">On Tue, Aug 25, 2009 at 2:16 PM, Jeremy Orlow <span dir="ltr"><<a href="mailto:jorlow@chromium.org">jorlow@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im">On Tue, Aug 25, 2009 at 2:09 PM, Brady Eidson <span dir="ltr"><<a href="mailto:beidson@apple.com" target="_blank">beidson@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div>On Aug 25, 2009, at 1:38 PM, Linus Upson wrote:</div></div><div><div><div><br><blockquote type="cite">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.<div>
<br></div><div>It would be better to remove section 4.3.</div></blockquote><div><br></div></div>I disagree. <div><br></div><div>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. </div>
<div><br></div><div>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.</div>
<div><br></div><div>But once the data is stored, it should be considered user data - as "sacred" as a user's file on the file system.</div></div></div></div></blockquote><div><br></div></div><div>What happens when your computer blows up? When you switch browsers? What about when you re-install your OS? etc</div>
<div><br></div><div>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?</div>
</div></blockquote><div><br></div><div>I just re-read your message and noticed that you suggested local storage should stop working when it's filled up. First of all, this seems completely unacceptable to me, especially since we don't have a good answer yet (besides quotas which are probably enough for your average desktop, but probably not your average mobile or netbook) to the problem of malicious sites filling up local storage with multiple sub domains.</div>
<div><br></div><div>Also, consider this scenario: you fill up your hard drive only 50% of the way with localStorage data. (Possibly by a malicious site, and thus the user is unaware.) Now you try to install a bunch of apps (maybe even over time) that consume the rest of the hard drive. So now the user is either SOL unless they can realize this space has gone to their browser and can figure out how to delete it?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div></div>
<div>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.</div>
</div></blockquote><div><br></div><div>One previous reference: <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-April/019276.html">http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-April/019276.html</a> I thought there was more discussion, but I couldn't find anything other than this thread after a quick search.</div>
<div><br></div><div>J</div></div>