Cached HTML after using Cordova to Cpacitor Migration #7790
Unanswered
marcelkipp
asked this question in
Q&A
Replies: 1 comment
-
Also tried to add some native code to clear the cache of the webview, which did not have any effect.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We migrated our app from Cordova to Capacitor. In order to transfer/migrate the IndexedDB values in our app we have the following setting in our capacitor.config
server: { iosScheme: 'ionic', androidScheme: 'http' }
Regarding accessing the IndexedDB no issues on both iOS and Android. BUT Android is facing a strange behaviour. After updating from App V1 (Cordova) to App V2 (Capacitor) the HTML is still the old one from V1, therefore assets are not being found and the HTML is not the one of V2.
My general guess is that Android is caching the HTML of V1. Once you make a fresh install of V2 the new HTML is there. Also removing the app-data in the settings does the trick (but than all data is lost). We already tried to clear the cache using this plugin capacitor-plugin-webview-cache.
Also trying to refresh the browser on startup with
window.location.href = window.location.href + '?cache_bust=' + new Date().getTime();
did not make any changes.Is there some setting or native code for android that needs to be inplemented in order to force the App the use V2 HTML?
Beta Was this translation helpful? Give feedback.
All reactions