0

I have coded a simple browser to which I set the start page to www.google.com (using the loadRequest method of WebView).

Now the thing is that I have added a button to the app which takes the user to another webpage, lets say www.yahoo.com (also using the loadRequest method).

Everything works perfectly, except when I am trying to go back to the previous page in my browsing history (in this case going from www.google.com to www.yahoo.com). It seems like the "redirect" is not registered in the browser history.

I have also tried redirecting the user through JavaScript directly by changing the window.location.href but this does not seem to work either.

How could I enable the user to go back to my start page by pressing the back button, having first been redirected.

All help is appreciated!

4

1 に答える 1