1
votes

Application cache is deprecated which means we'll need to switch to service worker but I've done research it was mentioned..

1) "It is not possible to use a ServiceWorker in a Cordova app because the ServiceWorker API is not available to WKWebView and is not implemented in UIWebView. It is available in Safari on iOS, but not WKWebView." //https://github.com/apache/cordova-ios/issues/414

2) Enabling appcache using private api is not working //Enable Application cache in WKWebView

3) Cordova file & file-transfer plugin is not even recommended to use for production.

Is there any alternatives to be able to store artifacts (html, js & css files) and load for offline used? Our application needed to cached 300-400 files.

Appreciate your suggestions in advance! (:

1

1 Answers

-2
votes

Well to answer your question, my suggestion would be this: Get rid of those 400 files and find a more practical way to replace them.

Exactly why would you need to store so much CSS files in a Cordova app anyway? There's no logical reason that I can think of. Nor practical, loading other HTML files in the WebView goes against the SPA design principle.