Skip to content Skip to sidebar Skip to footer

How To Load Third Party Non-secure Images In Cordova Webview?

I am trying to load an image from another website in cordova webview, and I get the following error Mixed Content: The page at 'https://www.website.com/' was loaded over HTTPS, but

Solution 1:

I found a solution; the idea is to use the MIXED_CONTENT_COMPATIBILITY_MODE of android in the inappbrowser. You must edit the file platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java

and add next to the WebSettings settings = inAppWebView.getSettings(); line:

settings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);

It's not a good solution, because you are editing the src of the plugin and if you update it, you will lose the changes... but it works for me ;)

Post a Comment for "How To Load Third Party Non-secure Images In Cordova Webview?"