webview.loadUrl("https://www.google.com").
The page shows the google's content.
webview.loadUrl("https://stackoverflow.com/").
webview.reload();
The page still shows the google's content. But the log shows:
webview.getUrl()-> https://stackoverflow.com/
webview.getOriginalUrl-> https://www.google.com
I am wondering how it happened and how to make it show the newest content when doesn't change App native code?
(To let h5 page to listen the 'reload' event???) Thanks!
You don't need to call webview.reload();
The second snippet should simply be:
webview.loadUrl("https://stackoverflow.com/");
I suspect the what you see is the result of .loadUrl()
starting to load the page, but .reload()
interrupting this process and reloading the current page.