[whatwg] Web Storage: apparent contradiction in spec

On Wed, Aug 26, 2009 at 8:58 PM, Peter Kasting<pkasting at google.com> wrote:
> I think having authors choose between permanent and purgeable storage types
> adds complexity to the implementation and usage that is not desirable from
> either an authoring or a UX perspective.

This complexity already exists for real apps, and developers seem fine
with it.  If you want persistent storage, you write to ~ or
C:\Documents and Settings\ or such; if you want temporary storage, you
write to /tmp or C:\temp\ or such.  The distinction is useful to both
users and developers, not burdensome.

If authors can't say "this can be thrown out if I haven't used it for
a while", poorly-written apps will ignore the issue and store data
forever.  If they're storing small amounts of data, they probably
won't run into any limits in testing, so they might not bother with
handling out-of-space errors properly.  So then eventually the garbage
will accumulate until they run out of room and die, or bother the user
pointlessly.

A properly-written app, on the other hand, will be burdened with
managing its own temporary storage.  Authors will have to manually
keep track of which of their resources are temporary and figure out
when to remove them.  Authors can't do this as well as the browser
can.  Authors don't know how much disk space is free, or how much
space other apps are using, and they're in no position to decide how
much disk space *should* be free.  They might use too much disk space,
or slow down their app by caching less for fear of using too much disk
space.  The browser should manage cache purging for the same reason
the OS manages the page cache instead of applications.

Received on Wednesday, 26 August 2009 18:29:03 UTC