Service Workers

Service Workers are the best way to implement offline first experience.

What is a Service Worker

You can find a nice intro here: https://jakearchibald.com/2014/service-worker-first-draft/. It is way better than offline caching in the older days. Yet, you still need to be a very skilled javascript engineer to make full advantage of it. Itsa-react-server will do this automatically for you.

How to enable service workers

It just needs to be enabled inside src/manifest.json:

"service-workers": {
    "enabled": true,
    "cacheAuthenticatedCode": false
}

If you do not have any high secure code inside your authenticated views, then you even better set cacheAuthenticatedCode true. All cachable modules are begin pre-cached.

OFFLINE