[whatwg] Improvement of the Application Cache
Edward Gerhold
edward.gerhold at googlemail.com
Sun Mar 6 14:38:49 PST 2011
I went already to bed. But i kept thinking about it. I would like to correct
myself a little, keep the idea alive and state it a little bit more clearly.
I think the functions where defined to loose or bound wrong to the
applicationCache object.
There should be the applicationCache.cache object which contains all the
entries (in my last mail .entries)
and the function should be bound to this object.
applicationCache.cache.get()
applicationCache.cache.add() - i think add should insert on existing urls or
index numbers
applicationCache.cache.set() - set should overwrite on existing urls or
index numbers
applicationCache.cache.update()
applicationCache.cache.remove()
I don´t know which events they fire, but names like the functions have look
good for me, and the event
data should have the data or the index numbers or urls. But every function
should fire an event.
The get and add methods should make it possible to add _data_ per parameter,
that i can _cache
on-the-fly generated content_ which is calculated by my application (i
wouldn´t need to write it down
maybe with the file api or save it otherwhere in the storage to include it
later in a space preserved for in the app-page).
The methods should accepts urls and index numbers.
The data fields of cache are
applicationCache.cache.index
applicationCache.cache.url
applicationCache.cache.data
applicationCache.cache.date
I would like to have to possibilty to add attributes to the cache. Chrome
inspector or another debugger hasn´t to
display them today, but they would later, if that is defined. They have a
cache listing already, it depends on the
spec, what´s there later.
Of course all functions should work for the master file, too.
And the keyword for blacklisting the master is
CACHE MANIFEST NOMASTER
That´s looking very simple to me.
Again, i think blacklisting the master will be needed, if i write the thing
with the filesystem and use the appcache.
The reload of the master will cause conflicts, or? Anyways, it´s annoying to
have the master file cached, if it is
a Joomla! /index.php and always displayed in an old version (best without
without images) to you.
Hope i improved it a little. Please think about it. The implementation in
chrome let´s the cache look like it could be
the time to improve it and to move it up to the second level. Micheal wrote,
you already had this designed before.
Time to work it out :-) [after working the other things on the to do list
out :-)]
Edward
More information about the whatwg
mailing list