W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] Unlimited pageStorage for App Cached web pages

From: Felix Halim <felix.halim@gmail.com>
Date: Mon, 30 May 2011 11:42:27 +0800
Message-ID: <BANLkTinY-2k8j-EC3GJdrJ46-m2dszrm_Q@mail.gmail.com>
Hmm.. yes, I think "unlimited" is a bad word (I just use it because
currently App Cache quota is unlimited).

Let me explain my need for pageStorage in a different way:

Suppose I have a web page and want to store it in an App Cache. This
web page requires a few resources (.ccs, .js, images, etc..). But all
of them are "static" resources. I want to store "dynamic" resources as
well for that particular page only (not shared). Think of  the dynamic
resources as "data" that changes from time to time for that particular
page only. localStorage can be used to store the "dynamic" resources,
but localStorage has very limited quota and it is shared to the entire
domain. Different unrelated pages in the same domain will use the
shared quota!

Currently I can "hack" the App Cache to simulate the pageStorage like this:

We can turn one of the .js files "dynamic" by updating the .js file,
then edit the MANIFEST file a bit, so that the browser re-download
*ALL* the resources again.  This way, the .js file quota gets in the
App Cache quota which is currently *UNLIMITED*. But this "hack" is
very costly, and inconvenient.

Then I think, would it be better just to introduce a pageStorage which
behaves like localStorage, but tied to the AppCache quota (not shared
and tied to the main page only)?

Felix Halim

On Mon, May 30, 2011 at 5:05 AM, Bjartur Thorlacius
<svartman95 at gmail.com> wrote:
> On 5/28/11, Felix Halim <felix.halim at gmail.com> wrote:
>> To summarize, the pageStorage offers "unlimited" storage for dynamic
>> content for the App Cached web pages.
> User agents may store expired pages for offline use. Internet Explorer
> and Firefox have 'Work offline' modes automatically enabled on
> complete disconnection from the network. Currently, only cached pages
> and sites explicitly selected by the user are available offline, but
> given enough disk space, user agents might keep all files of MIME type
> "text" (e.g. text/html and text/plain) - or even all files.
> The variation on constraints between systems is such that even looking
> only at my desk there's a system with over 1.7GiB of free read-write
> memory (0.5MiB magnetic, 1.3GiB volatile RAM) and another one with
> under 300MiB (volatile RAM). I don't want authors to be able to use up
> my memory by storing most or all content for offline use, nor to
> unnecessarily loose access to content when storage space is plentiful.
>
Received on Sunday, 29 May 2011 20:42:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:33 UTC