4 ms·
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
by Sacho 9y ago
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.
- floatboth 9y agoFor web apps running in normal browsers, Service Workers ARE that facade.
- underwater 9y agoYou 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.
- marksomnian 9y agoIt'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.