drhenchufesolar opened a new issue, #992:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/992

   # Bug Report
   
   I have an application in Ionic 6 and Angular 14 in which I use the 
InAppBrowser plugin to use a web application of my company and the plugin 
doesn't load the cache/cookie from web when I use the hardware back button.
   
   ## Problem
   
   The plugin works fine in general, the situation is that there is a cookie in 
the web application that is used for the filters of some lists that are in the 
web application. When a user filters and enters (for example) a specific client 
from a list and uses the hardware back button to go back to the list, the 
filter disappears. From the PC, when you go back the filter is maintained, 
which means that the cache is maintained.
   
   When I use the DevTools (from Google Chrome: chrome://inspect) to check the 
Ionic app, the cookie works, but when I don't use it, it doesn't work as I 
mentioned above. It seems that by doing the hardware back button in the 
InAppBrowser the cache is not maintained or it is not loaded. All this without 
changing anything in the code.
   
   So I'm asking if there is a way that when I do the hardware back button it 
loads the previous page with the cookie/cache loaded. Or if it really shouldn't 
load anything since the filter has already been applied and the cookie has been 
overwritten.
   
   ### What is expected to happen?
   
   What I expect to happen is that when, for example, a user has used a filter 
from the web application, when the hardware back button is made, that filter 
(saved in the cookie) is maintained, just as it does when using the web 
application. on a PC.
   
   ### What does actually happen?
   
   What happens right now is that when using the hardware back button the 
filter that had been made disappears, but the thing is that the cookie still 
exists, since using the DevTools it works without having made any changes to 
the code.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   ### Command or Code
   
   This is how I create the InAppBrowser:
   ```
   browser = this.iab.create(pageContentUrl, '_blank', 
'location=no,zoom=no,fullscreen=no,clearcache=no,clearsessioncache=no,hidden=yes,toolbar=no');
   ```
   
   I have this to check the cookie:
   ```
   browser.on('loadstart').subscribe((e: InAppBrowserEvent) => {
         browser.executeScript({
             code: "(function() { \
               console.log(document.cookie);\
             })();"
           });
   });
   ```
   
   
   ### Environment, Platform, Device
   
   - Android 11 - Samsung Galaxy A12
   
   
   
   ### Version information
   Ionic info:
   
   Ionic:
   -    Ionic CLI                     : 6.20.1 
(C:\Users\david\AppData\Roaming\npm\node_modules\@ionic\cli)
   -    Ionic Framework               : @ionic/angular 6.2.5
   -    @angular-devkit/build-angular : 14.2.1
   -    @angular-devkit/schematics    : 14.2.1
   -    @angular/cli                  : 14.2.1
   -    @ionic/angular-toolkit        : 6.1.0
   
   Capacitor:
   -    Capacitor CLI      : 4.1.0
   -    @capacitor/android : 4.1.0
   -    @capacitor/core    : 4.1.0
   -    @capacitor/ios     : 4.1.0
   
   Utility:
   -    cordova-res : 0.15.4
   -    native-run  : 1.6.0
   
   System:
   -    NodeJS : v16.15.1 (C:\Program Files\nodejs\node.exe)
   -    npm    : 8.11.0
   -    OS     : Windows 10
   
   List of plugins installed and dependencies from package.json :
   "@angular/common": "^14.0.0",
   "@angular/core": "^14.0.0",
   "@angular/forms": "^14.0.0",
   "@angular/platform-browser": "^14.0.0",
   "@angular/platform-browser-dynamic": "^14.0.0",
   "@angular/router": "^14.0.0",
   "@awesome-cordova-plugins/device": "^5.44.0",
   "@awesome-cordova-plugins/http": "^5.44.0",
   "@awesome-cordova-plugins/in-app-browser": "^6.3.0",
   "@awesome-cordova-plugins/network": "^5.45.0",
   "@awesome-cordova-plugins/screen-orientation": "^5.45.0",
   "@capacitor/android": "4.1.0",
   "@capacitor/app": "4.0.1",
   "@capacitor/core": "4.1.0",
   "@capacitor/device": "^4.1.0",
   "@capacitor/haptics": "4.0.1",
   "@capacitor/ios": "4.1.0",
   "@capacitor/keyboard": "4.0.1",
   "@capacitor/local-notifications": "^4.1.0",
   "@capacitor/push-notifications": "^4.1.0",
   "@capacitor/status-bar": "4.0.1",
   "@capacitor/toast": "^4.1.0",
   "@ionic/angular": "^6.1.9",
   "@ionic/storage-angular": "^3.0.6",
   "cordova-plugin-advanced-http": "^3.3.1",
   "cordova-plugin-device": "^2.1.0",
   "cordova-plugin-file": "^7.0.0",
   "cordova-plugin-inappbrowser": "^5.0.0",
   "cordova-plugin-lottie-splashscreen": 
"github:timbru31/cordova-plugin-lottie-splashscreen",
   "cordova-plugin-network-information": "^3.0.0",
   "cordova-plugin-screen-orientation": "^3.0.2",
   "ionicons": "^6.0.3",
   "rxjs": "~6.6.0",
   "tslib": "^2.2.0",
   "zone.js": "~0.11.4"
   
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to