Open url inside app in Ionic

Hi all ! Could anyone suggest please … is it possible to open url (website) inside app ?

Off course. You should use the inAppBrowser for that:

luukschoen, good day ! I am trying something like this …

  openUrl() {
    let browser = this.InAppBrowser.create('');

It open url above app … but is it possible open url inside app (inside page) like iframe ?

You could use an iframe… but this would probably break a lot of stuff.

Nope it isn’t. What are you trying to achieve? Maybe we could suggest a good alternative way. If you want to display another website in your app, you should use an iFrame. But I would discourage you to use an iFrame (although it’s possible with restrictions). Right now there’s no way to use another website in your app then by using an iFrame.

luukschoen, I would like to have the opportunity open website inside app … to do needable thinks on website and go to back for example …

Just open up your website with params in the inappbrowser. If you want to put back stuff into your app, use a deeplink to your app. That’s the best (and most reliable imo) way.

luukschoen, thanks for answer ! But why iFrame it is a bad way ? It is not working well ?

display of websites in iFrames are discouraged since lot of websites send an “X-Frame-Options: SAMEORIGIN” response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.


Hi Frd,
It is very easy to open url in inside app like this.

Above link is,how to open url in inside app.Please refer and try it.