Is it possible to embed site "X-Frame-Options: SAMEORIGIN" in phoneGap?

Is there a way to have the ("X-Frame-Options: SAMEORIGIN") website in the phone:

or in the following terms: I want to embed google.com into a phone conversation application: is this possible? (I tried with an iframe and no way)

(I am using the crossroads using the SDK for SDK)

+3


source to share


1 answer


You can use the Cordova In-App-Browser plugin to open external websites. This will open a modal with the website you specified.

Below is a sample code to open google.com, make sure you have installed the plugin "In App Browser" from Intel XDK settings -> -> Plugins



<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
        <script src="cordova.js"></script>
        <script>   
function openIAB(){
    var url = "http://google.com";
    window.open(url, "_blank", "location=yes");
}            
        </script>    
    </head>
    <body>
        <button onclick="openIAB()">Open Google</button>
    </body>
</html>

      

documentation for the App Browser plugin: https://github.com/apache/cordova-plugin-inappbrowser

+2


source







All Articles