Redirect to an internal html page, staying in the webview


When my app is launched (from index.html), for some reason, i need to go to another page (let say about.html).

In JS, i try a‘about.html’, ‘_self’), but it keep open the external browser on the device…

How to do this, staying in the app webview ? I tried to go to the result of tool.getURL, but it keep opening external browser with


PS : problem is on Android (9 or 10).
On ios,‘about.html’) work perfectly

I tested‘about.html’,’_self’) on

  • FORGE / ios : it stay on the WKWebView, OK
  • Cordova / ios & android : it’s OK
  • Capacitor ios & android : OK
  • FORGE Android : it open external browser…

So it’s not a problem related to webview system. It’s forge internal problem i suppose

What are you actually trying to do in your app? may not be what you should be using…

If what you are trying to do is navigate to another page in your app then using a simple href should work because the application is running as httpd or localhost so its not different in that case.

If you must use JS to navigate in terms of an onclick event then window.location should be used as for a new tab not to redirect.

Further to that point, using ui frameworks can really go a long way to help, with built in routing etc it can make building the application much easier.

Hello and thank you.

Yes, my question could make you think it was a beginner question, i should have explained more :

It’s more for development phase use. I use 3 differents framework (quasar, Framework7, etc…) and i have 4 apps to test and make test to others. I want to embed all those apps in one development app. So At launche, my index.html make a “redirect” to 1 of the 4 folders containing my apps (and share js libs at root level for information).

I was thinking it was very easy (and it work on most cases) except Forge + Android.

As i always want to understand, i keep trying make it work, and i would like to understand why Forge keep opening external browser


It looks like the built-in webserver doesn’t automatically get added to the trusted_urls list on Android.

Try adding the following to the "general" section of your src/config.json:

"core": {
    "general": {
        "trusted_urls": [
        ... rest of config ...

Thank you muchly for reporting this, I’ll fix it in the v2.9 release.

Perfect ! It works with trusted_url configuration.

Thanks for this.

1 Like