How to go back to application after pressing on external URL? [SOLVED]


In “About” view I have following function:

$scope.exturl = function() {
  	var url = "";
  	var ref =, '_blank', 'location=no');

In HTML I have:

      See <a href="" ng-click="exturl()">Privacy Policy</a>      

However when I press on link and it redirects me to the site, I try to press on back button - nothing happens.

So I have no idea how to get back to application.


I run on Android,

I installed org.apache.cordova.inappbrowser plugin:

cordova plugin add org.apache.cordova.inappbrowser

In config.xml I see:

 <feature name="InAppBrowser">
      <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />

I changed my method to:

$scope.exturl = function() {  	
  	var url = "";
, '_system', 'location=yes');        
        return false;

Still the same problem.


1 Like

If this is ios and you have the inappbrowser installed, it should present you with a done button to close the browser. If this is android, you should have an X button in the browser bar.

please see my edit. Yes, I installed this plugin but back button doesn’t work. I don’t see “X” button in browser. Sounds like it opens default browser


I didn’t run:

cordova prepare ios
cordova prepare android

It should activate plugin.

The other way that works for me is:, { openExternal:true });

Here you don’t need any plugin


Could you please elaborate how did you get to go back to the app ?

According to this:

The object is not documented and is platform-dependant, so if someone is going to use it, should check first the implications of that…

On the other hand, the inappbrowser is working fine, I replaced the calls with:, '_blank', 'location=yes');

documentation for it:

Perfect, i really need this… thanks

how to go back from external url to app pages using trigger event ?

please let me know process
i have struck with redirecting url from web view to app ?

1 Like

I am facing the same issure. But no one is sharing any clue to get back to the app from the inappbrowser. If i press back button from InAppBrowser, it closes my application also. Any hint?

In Ionic 3, You Can use close() to perform this operation.

import {InAppBrowser, InAppBrowserEvent} from '@ionic-native/in-app-browser'; //import 

Private inAppBrowser:InAppBrowser;  //in your contructor

let browser = this.inAppBrowser.create('', '_blank', 'location=yes');    //This will open link in InAppBrowser
     var closeUrl = ''; 
     if(event.url == closeUrl)
            browser.close();       //This will close InAppBrowser Automatically when closeUrl Started

Above code working on Native Device…

Sorry i am facing this issue in ionic-v3

any solution for this type case ?

for example we have stripe checkout page into ionic app then if we open into inappbrowser then how to back to app open page from where checkout started?