Iframe - https site not working my app. Please help
Hello Try embedding a youtube video. I tried and it working.
Kindly share code. This is iframe https url : https://www.genworth.com/life-and-annuity-transition-sales-center.html itnāt working
Hello I tried the above URL and its not rendering the page within i-frame because, Same-Origin policy has been set for the site and you cannot embed that site within in an iframe. Even you cannot embed https://www.google.com within the iframe because of same-origin policy. For more information checkout this link:
http://javascript.info/tutorial/same-origin-security-policy
On my console I got this error this is because of same origin policy:
Refused to display āhttps://www.genworth.com/life-and-annuity-transition-sales-center.htmlā in a frame because it set āX-Frame-Optionsā to 'SAMEORIGINā
Having used iframe personally but this might help https://cordova.apache.org/docs/en/latest/guide/appdev/whitelist/ ?
You really should not be using iframes at all in you app.
If you need to load content from a website, use the inappbrowser plugin.
Thanks for your suggestion, kindly share inappbrwser plugin url or sample codeā¦
Inappbrowser used to open a external browser in our app. but how to open with in a page?
InAppBrowser is ugly thoughā¦ it loses appās UI (header, footer nav, etc) - typically not a great solution.
Agreed, thats why Iāve been suggesting
As a better alternative
hmmā¦ interesting. screenshots donāt show app UI though; so how is this better than InAppBrowser?
The point isnāt to show āapp UIā, it for external content that you want to show, but not open in external safari.
If you want to actually load a site and embed it in your app, youāre not going to have a good time Iām afraid. Apps like this can be rejected by apple as theyāre not what they want an app to be. Instead, setup a simple REST API and load JSON data.