News for hackers. Stuff that matters.
Re:JSC loves ES6 by Sacho on Tuesday June 06, 2017 @05:16AM (#14495831)
Can't this be solved by a library? It seems like you could easily build a facade in front of requests that queried local storage...you would just need to figure out whether the device/server is online or not.
Re:JSC loves ES6 by marksomnian on Tuesday June 06, 2017 @10:46AM (#14497600)
It's not just XHRs, it's all requests by your app. The HTML, the CSS, images, everything. The entire site can be served offline by this API.
Re:JSC loves ES6 by underwater on Tuesday June 06, 2017 @06:10AM (#14496067)
You need to be able to bootstrap the page to start with. If I request news.ycombinator.com and I'm offline, then Service Workers are the only way to avoid an error page.
Re:JSC loves ES6 by floatboth on Tuesday June 06, 2017 @05:50AM (#14495984)
For web apps running in normal browsers, Service Workers ARE that facade.