News for hackers. Stuff that matters.
Re:Instant Loading Web Apps with an Application Shell Archit... by daleharvey on Friday November 20, 2015 @11:16AM (#10601955)
It is basically reinventing caching but correctly, caching at the http layer does not handle updates properly, preloads very well at all and is entirely unreliable.

For example load http://pouchdb.com/, first page load may be a little slow but the rest will be very fast aside from the api page which has some slow JS (if the rest of the pages didnt load instantaneously we would probably never notice how JS slows that page). Turn your internet connection off while you browse, its all fine.

The above is using AppCache, but a big part of ServiceWorkers is learning from the AppCache mistakes and having a more flexible / powerful framework for them.

Re:Instant Loading Web Apps with an Application Shell Archit... by StavrosK on Friday November 20, 2015 @11:23AM (#10601999)
Why is caching at the HTTP layer unreliable? With cache-busting URLs I've had no problems at all.
Re:Instant Loading Web Apps with an Application Shell Archit... by daleharvey on Friday November 20, 2015 @11:33AM (#10602058)
Turn your internet connection off and try to reload this page, or even with your internet connection on look at how many pointless http requests are made that slow the page down on every reload.

HTTP Caching does not have explicit guarantees about the availability of things in its cache, ServiceWorkers and AppCache do.

Re:Instant Loading Web Apps with an Application Shell Archit... by bsuh on Friday November 20, 2015 @12:42PM (#10602532)
Why is having the shell being able to load offline when the XHR'd content won't be able to load a plus? It makes sense for productivity apps like Google Docs, where you're writing the content, but not for a majority of apps.

I'm tired of web 2.0 ajax sites where you scroll through content, click a link, then you try to go back, and you have to scroll through the same things you didn't care about again. Or in Facebook newsfeed's case even reorders things.

It honestly feels like "Ooh look at this shiny new tech. Let's use it! Why? Because we need to improve 'usability'! proceed to throw other usability concerns into the trashcan"

Re:Instant Loading Web Apps with an Application Shell Archit... by derefr on Saturday November 21, 2015 @02:30AM (#10606070)
Imagine an RSS reader (which Facebook, Twitter, etc. basically are.) 99% of the time, an RSS reader doesn't need internet connectivity; it just has a database of synced feed-items and you can peruse them. When you pull-to-refresh it, it goes online and actually retrieves updates for its feeds, then (crucially) finishes and is now offline again.

There's no reason such an app can't be implemented as a plain-old-webapp pinned to your iOS springboard or whatever else. You open it, you get RSS items. You try to refresh, it says "no internet, sorry", and the refresh is cancelled. Every other part of the functionality continues to work just fine.

There's actually something that does exactly this: visiting the Gmail website on iOS will build a local database of your mail, and let you continue to interact with it, search through it, write emails and "send" them (they stay in your outbox) when you don't have internet connectivity.

Re:Instant Loading Web Apps with an Application Shell Archit... by aggronn on Friday November 20, 2015 @02:32PM (#10603299)
It might help to think of this paradigm as "streaming apps". Instead of downloading apps and having them on your home screen, you go to a URL and it behaves like any other app--it will render its own app shell and then say "Sorry, can't get content. Check network connection".
Re:Instant Loading Web Apps with an Application Shell Archit... by ex3ndr on Friday November 20, 2015 @02:38PM (#10603331)
This is not true. 1) When devtools are opened in chrome - caches are disabled by default 2) Even when requesting to server - chrome show it as request 3) Manifests works like a charm. You can open app completely offline. For example, you can check telegram web app (our project disabled this feature during development). 4) Manifests easily handle updates of web apps - just re-requesting manifest once 20 min +