How to clear all cache InAppBrowser


#1

hello im doing an app with ionic, an i am having trouble with the cache in the inappbrowser.
i am using a firebase authentication with google the problem is cache not clear when someone logout from my app.

the question is how do i clear ALL cache when i logout from my application.

note: I am using firebase social auth, i also tried this
$ionicHistory.clearCache();
$ionicHistory.clearHistory(); didn’t work :confused:

and this solution does not work for me: window.open(‘https://mail.google.com/mail/logout?hl=en’, “_blank”, “location=no,clearsessioncache=yes”)


#2

I used ngCordova and it worked

var options = {
      location: 'no',
    clearcache: 'yes',
  toolbar: 'yes'
};

$scope.openBrowser = function() {
  $cordovaInAppBrowser.open('https://www.google.com', '_self', options)    
  .then(function(event) {     
    console.log(event);
     // success
  })

  .catch(function(event) {
     console.log(event);
     // error
  });

}