Offline mode and caching


#1

Im trying to understand how when there is no connectivity how caching works, I have seen the section under App/Core in the F7 guide on switching on cache, but I cannot for the life of me get it to work.

I have started loading content into localstorage and then using this to populate when offline - i just wanted to know if there is a better way?


#2

Built in router cache is the runtime only cache unless you reload the app. For real offline caching you need to use service workers. It is a pretty complex thing in JavaScript which is a part of so called PWA. You can read more to start here https://developers.google.com/web/fundamentals/primers/service-workers/