5 ms·
Service Workers are what Application Cache should have been first. Application Cache has a big flaw and that is, you can't control it much. You depend on browse
by msoad 12y ago
Service Workers are what Application Cache should have been first. Application Cache has a big flaw and that is, you can't control it much. You depend on browser to decide what to do when there is no Internet connection. With Service Workers you get to programmatically tell browser what to do with network requests and so on.
Classic configuration file vs. let me write actual code approach. I'm glad we have both now! Application Cache makes sense for a lot of static websites.
- Someone1234 12y agoI tried playing with Application Cache, but my applications kept getting "stuck." The user would return online and the old version of the application would be shown and it wouldn't update the one cached either... Only solutions I found required configuring the web-server. Which is fine in theory, but when you consider that an application is a self-contained blob of static data in this context (i.e. HTML, CSS, JS, and a manifest) you'll potentially need one web-server cache policy for legitimately static content (i.e. HTML with no manifest) and another for Application Cache (i.e. HTML with a manifest) just to make sure the Application Cache is flushed correctly. I find it very telling Google web-pages don't use Application Cache (e.g. Gmail). In fact the only thing in chrome://appcache-internals/ is the new-tab page.
- danudey 12y agoPerhaps I'm mistaken, but I recall that there is a way to tell the browser to 'flush' the application cache, but only once the user has loaded the old version of the application anyway; in other words, you can tell the browser that the next time they load the page, they should load the new version. Which seems odd.
- realusername 12y agoThe only way to force a reset is to query the manifest and receive a status not equal to 200. If your application is stuck to an old version, this is the only way to update it. And Firefox is considering the manifest as a normal cache so you need to put a lot of http headers to prevent any normal cache otherwise Firefox will never check any updates.
- ricktdotorg 12y agojust for the record, Google Books (books.google.com) does indeed use Application Cache