Gilluisf
Gilluisf

Reputation: 41

Cordova plugin InAppBrowser is not opening links

I want to open a link inside InAppBrowser using Google chrome. This is my code: var teste=cordova.InAppBrowser.open('https://free.facebook.com/','_blank','location=yes')

I am getting this error message: chromewebdata/:1 Refused to display 'https://free.facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

Upvotes: 1

Views: 586

Answers (1)

Anirudh santhosh
Anirudh santhosh

Reputation: 461

you can't show https://free.facebook.com/ inside of chrome using InAppBrowser, because the header x-frame-options: DENY which is sent by facebook.com is denying the browser.

you can see this header and other valuable headers from network tab in the developer tools enter image description here

you can read more about the header from here mdn : X-Frame-Options

this will work like you expected in android.

Upvotes: 1

Related Questions