plateaukao / einkbro

A small, fast web browser based on Android WebView. It's tailored for E-Ink devices but also works great on normal android devices.
Other
1.13k stars 80 forks source link

go back not work when redirect happens #260

Closed bibu2651 closed 1 year ago

bibu2651 commented 1 year ago

sometimes when we click go back but can't get back because some site using redirect. I try to fix the problem by changing line 111 in NinjiaWebViewClient.kt like the following:

========================================== if (url.startsWith("http")) { // webView.loadUrl(url, ninjaWebView.requestHeaders) // return true

        // remark two lines above, and return false to let webkit handle go back, who can
        // go back to the correct page
        return false
    }

==========================================

it works for me

plateaukao commented 1 year ago

thanks for the information. Could you provide what websites you have verified?

bibu2651 commented 1 year ago
  1. open www.baidu.com
  2. search apple
  3. open apple official website in search result
  4. when apple website loaded, click back, the page reloaded but still show apple site