<div class="gmail_quote">On Tue, Aug 25, 2009 at 2:09 PM, Brady Eidson <span dir="ltr"><<a href="mailto:beidson@apple.com">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 class="im"><div>On Aug 25, 2009, at 1:38 PM, Linus Upson wrote:</div></div><div><div><div class="im"><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>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><br></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><br></div><div>J</div></div>