gorgi93
gorgi93

Reputation: 2535

phonegap loading pages from server

Im new to phongeap. I saw you can load page from server when you are changing the current page, for me this is the best solution but I am wondering how slow is this in real life on real device?

Upvotes: 0

Views: 161

Answers (2)

nuala
nuala

Reputation: 2688

Do you have a real device and used mobile internet in the tube, bus, boat, toilet (^^)?
Technically speaking loading other pages is just a question of transferring source code to the device. HTML, CSS JavaScript, the resources etc.
So speed really depends on the actual situation, the network coverage, available bandwidth etc.

Why do you think loading a web page is the best solution for you? (and if you ask this question you're maybe not so convinced that it's actually the best solution, not?)
If you have content that changes often why not downloading only the necessary part to your app while providing all the layout information in the package.

Especially JSON is pretty lightweight (in terms of data size) which is why it's usually my preferred weapon of choice.

Upvotes: 1

davids
davids

Reputation: 6371

You can request any page you want from your server and display it through Javascript. However, that wouldn't look like a native app, as there would be a delay while loading the page. So the solution would be storing the whole layout in the client app, there are several javascript frameworks that ease this task, such as jQuery Mobile or Sencha. This doesn't mean that you can't retrieve data from any server, but you could request it in any format you want (Json, XML...) to feed your app.

Upvotes: 2

Related Questions