I have recently upgraded to Cordova InAppBrowser plugin to 3.2.0 which uses wkwebview to render HTML content. I have always been able to load local HTML file by using the following the code:
cordova.InAppBrowser.open(
'cdvfile://localhost/bundle/www/assets/index.html',
'_blank',
);
However, wkwebview doesn't support 'cdvfile' so I tried using the relative file as below
cordova.InAppBrowser.open(
'assets/index.html',
'_blank',
);
This approach is not working either. The inAppBrowser opens and shows HTML Error 403: forbidden. After I close the browser, all the local files like IMG becomes unavailable and browser console [Error] Failed to load resource: the server responded with a status of 403 (Forbidden). I don't understand why closing browser cause other local files become accessible.