Question

Iam developing an application using phonegap, I need to load load a website(say www.google.com) in my app. How to do this ?

1.I need both ios and android

2.Need to open website in my app, not with native browsers .

Was it helpful?

Solution

You can use InAppBrowser which is specially designed for this kind of purpose. You can do like this

var ref = window.open('http://apache.org', '_blank', 'location=yes');

for more information regarding InAppBrowser you can see this document.

OTHER TIPS

You can use iframe as below to load external webpage .

<iframe id="myIframe" src="http://www.google.com" height="200" width="500">

</iframe>

Note :you can have iFrames in your app to show some web pages but you have to be careful about which website you want to load in iFrame because most of the popular websites (FB, Twitter etc) doesn't allow their website to be rendered in iFrame using META tags.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top