Closed chrisalexander closed 9 years ago
We don't want to encourage use of app cache, I don't think, because it sucks. But nobody supports service workers yet. Not sure what to do here.
So these two pages seem the best / most recently updated appcache guides:
http://www.html5rocks.com/en/tutorials/appcache/beginner/ http://alistapart.com/article/application-cache-is-a-douchebag
While there are certainly a long list of hugely irritating downsides, for a single page app and with the right guidance it shouldn't be rocket science to get right.
I think I will give appcache a go at some point on one of the demos and see if I can produce something useful.
Current situation:
My vote would be to encourage app cache for now, because:
One note that is worth bearing in mind - what browsers are we actually aiming at here? Chrome for Android is one obvious one, presumably Safari for iOS too though I don't have anything handy to actually run tests on. In which case it might be possible to move to serviceworker sooner if the support becomes available. But I concur with the "appcache for now"
A reasonable policy. If the base template encourages Angular (and that's what I used for the two apps I did) then we'll need local Angular rather than google cache angular. Note that the currency converter does work offline; it ships with a base set of rate conversions and then updates them online if it can. So I think that it would be an OK thing for offline too... and once we start incorporating offline support into things, I think it would be reasonable to dictate that the webutils all have to work offline to warrant inclusion.
Realistically we have to include iOS Safari; if we build things which don't work on the iPhone then half the people in the world can't use it...
As per #1 - open issues against repos that closed previous requests in order to add offline support for them, once this has been figured out.
Ah, cool currency converter works offline. I guess in that case you could use some grayscale effect or whatever to indicate stale data (a useful convention too). It's definitely useful offline as a travel app.
Agree about requiring offline support. Even apps that rely on being offline can show basic setup data (e.g. IM and streaming media) and indicate they're offline.
That's what the "updated" figure means; it's how long ago that rate was definitely correct...
I have added offline support to Compass, and I will attempt to come up with some guidance on doing it for simple apps, perhaps on the wiki.
I have started on this here: https://github.com/WebUtils/Platform/wiki/Offline-support-in-WebUtils
The wiki has been played around with and given an example (for "always offline") app (which involved actually building one first). I have created #20 and #21 to do the other two app types, when we get round to building those app types.
Calculator app is now changed to work offline, with appcache. This involved having local copies of angular and the chosen web font, and a cache manifest. See https://github.com/stuartlangridge/webutils-calculator/commit/81a0926f3292745ddf5a8690f43d8599aa67af4b.
So far as I'm aware, offline is still a bit of a mess (when it comes to caching resources etc.)
Try and find out what the best practice is these days and incorporate it into a sample app if its not insane (cough offline manifests).