1

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! (:

y-dolem
  • 62
  • 3

1 Answers1

-2

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.

andreszs
  • 2,896
  • 3
  • 26
  • 34
  • It's a company application. It requires to be loaded online & offline. Currently we are still using UIWebview with Appcache which all files are fetching from server. – y-dolem Feb 12 '19 at 02:21