cordova-plugin-ionic-webview
cordova-plugin-ionic-webview copied to clipboard
Reloading the index page every time when swiping back from a loaded subpage
Im using the plugin with my phonegap.build app. And I have a issue and couple off questions.
Issue: When I click on a link in my start page and load a subpage and then swipe back to the start page, then the start page freezes for about 4 sec before I can scroll it again. And I realised that it is reloading the start page every time I go back from a subpage.
-
Is this the expected way it should work? To reload the startpage? How to prevent it from reloading the startpage? Why doesn´t it work like in Safari? Since Safari is using the wkwebview! When you load a subpage and then go back Safari remembers the position off the previus page, why is this not doing that?
-
When I open a subpage it is opened in a new view on top of my start page. And I wonder if it is possible to open it in the same view as the startpage? So all pages is loaded in just one view?
-
Is it possible to slide in a subpage and slide back(when click on a button). I know that this plugin is sliding in external pages cordova-plugin-safariviewcontroller, so can you do the same with this plugin?
Any input appreciated thanks.
Were you able to resolve this? I just started using this webview to better support iOS and it reloads when pressing the back button on the android device...
Any updates on this? Did you guys ever figure this out?
I was already overriding the back button behavior so I just removed the call to history.back() that was there before the upgrade to wkwebview. It seems that the initial value of the history is empty and so the app exits in this case.
Adding a dummy initial value when the app starts can solve this issue (although not the solution I chose).
In any case, this is my solution:
https://github.com/IsraelHikingMap/Site/blob/8bb73d3049f7bd5282d7e7720d627082b4730a9f/IsraelHiking.Web/sources/application/services/application-exit.service.ts#L90