[whatwg] AppCache and SharedWorkers?

Alexey Proskuryakov ap at webkit.org
Fri Mar 27 00:44:07 PDT 2009


On 27.03.2009, at 0:16, Drew Wilson wrote:

> Are you suggesting that user agents may want to require explicit  
> user permission when any application invokes  
> ApplicationCache.update()? That might be a reasonable approach if a  
> given user agent wants to enforce some kind of "no silent update"  
> policy...


Asking for permission each time will condition users to click "Allow"  
without thinking, which will be just a nuisance. But the big  
difference between normal offline applications and persistent workers  
as proposed is that the user explicitly starts the application in a  
browser window - either by opening an URL, or using a desktop link. On  
the other hand, a persistent worker "would be started up on every  
subsequent invocation of the user agent until it has been killed".

Besides, application cache update is usually triggered by simply  
opening a document from the cache, not by an explicit update() call.  
See 5.8.6 (the application cache selection algorithm): "If document  
was loaded from an application cache<...> Invoke the application cache  
update process for that cache and with the browsing context being  
navigated." So, if you have e.g. a worker that checks google.com e- 
mail and updates a status icon with the number of unread messages,  
then it will be updated whenever the user goes to read the mail online  
(assuming the worker source lives in the same cache as the application  
itself, which I think makes sense).

Thus, I think that the way for a persistent worker to manipulate the  
cache is by opening a browser window with an HTML document.

- WBR, Alexey Proskuryakov





More information about the whatwg mailing list