On Wed, Aug 4, 2010 at 7:15 PM, Jonas Sicking <[email protected]> wrote:
> On Wed, Aug 4, 2010 at 2:56 AM, Jeremy Orlow <[email protected]> wrote: > > On Tue, Aug 3, 2010 at 11:26 PM, Jonas Sicking <[email protected]> wrote: > >> > >> On Tue, Aug 3, 2010 at 3:20 PM, Shawn Wilsher <[email protected]> > wrote: > >> > Hey all, > >> > > >> > Some of the feedback I've been seeing on the web is that there is no > way > >> > to > >> > remove a database. Examples seem to be "web page wants to allow the > >> > user to > >> > remove the data they stored". A site can almost accomplish this now > by > >> > removing all object stores, but we still end up storing some meta data > >> > (version number). Does this seem like a legit request to everyone? > >> > >> Sounds legit to me. Feel somewhat embarrassed that I've missed this so > far > >> :) > > > > Agreed. > > What should the semantics be for open database connections? We could do > > something like setVersion, but I'd just as soon nuke any existing > connection > > (i.e. make all future operations fail). This seems reasonable since the > > reasons we didn't do this for setVersion (data loss) don't really seem to > > apply here. > > Actually, there could dataloss apply here. Consider a page which > creates a temporary database, fills it with data, and then slowly > sends it to the server. Once all data has been sent to the server the > database is removed. > > If you have two instances of that page open, one could remove the > database while the other is still writing to it. > > Though this seems like a pretty scary setup anyway since if the user > closes the second page midway through, the first one will succeed in > deleting the database no matter what. Well, presumably the site won't delete a database programmatically if it still has important information in it. I mean, the same scenario you just explained could happen with .clear() or .removeObjectStore() as well. J
