Chrome 40 beta: Offline service workers
blog.chromium.org
blog.chromium.org
I'm really glad for the second half of that statement.
While I could imagine a few use cases, the last thing I want on my smartphone are arbitrary bloated sites draining my battery after closing them. I even consider it a feature of websites vs. native apps.
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.
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.
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.
I attended a talk by an FT engineer and I was amazed by what's possible.
Update: Mistakenly thought that FT uses Polyfill for service workers.
While what the Financial Times has done with polyfills is pretty neat, it at least does not document any of the behavior mentioned in this article.
In fact, it seems very clear that they are making use of App Cache for their website, which the technology mentioned in this article effectively replaces.
Polyfills emulate service workers as they were not actually implemented in any browser. So they have to fall back on App Cache. But now they can seamlessly use Chrome's native service workers while still relying on polyfills for other browsers.
Emulating service worker with App Cache sounds... very hard. Do you have more info on this specifically? I've got an app that's using app cache now and I'd like to gracefully transition it to using service workers as they become available.