I currently have a basic HTML/JavaScript application (without Phonegap) that I utilize alongside a native Android app and a WebView.
When certain situations arise, I need to reload the current page in the JavaScript portion. On my old phone with Android 4.3, all I had to do was:
document.location = "index.html"
However, on my new phone running Android 5, this method no longer seems to be effective. While it still works for navigating to a different page (e.g. from "books.html" to "index.html"), reloading the current page produces no result.
Upon inspecting the WebView using Chrome debugger, there are no errors or warnings present. The functionality works perfectly fine in Chrome on my PC.
A point to keep in mind:
I attempted the solution suggested by Rajesh, but unfortunately, it did not work as expected.
During my investigation, I stumbled upon this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=327728
To resolve this issue, it is necessary to set a WebViewClient on the webView:
webView.setWebViewClient(new WebViewClient());