PhoneGap is a cool platform that let you build mobile application with your web skill, and often, reuse your web resource to consist as a part of your mobile application.
So PhoneGap use the concept that called ‘White list’, a set of domain’s name syntax that has been written to allow application to access external resource in the Internet. Those resource can be anything, such as image file, web service, or even the whole web page.
The problem when the application load and import external web page
If you use JQuery Mobile as a core framework. You will found that <a> can be used to browse and load external page from Internet into your application easily.[code lang=”html”] <a href=”http://www.nextflow.in.th” data-role=”button”>Official Website</a>
This is very cool. But you may found yourselves stuck in a loaded web page, but its function doesn’t work or the presentation looks strange, then you might realize
Let’s take a look what cause this.
The reason that make loaded web page doesn’t work as you expect, is simple mistake.
Sometime, these external files comes from public web API, such as Google API or Facebook API, and they aren’t hosted on your server, specifically, in the domain’s name you put into white list. The white list will detect those unlisted domain’s names, then reject them.
How to solve the problem?
In the other hand, the rejection can be used to find any harmful script which may included in the HTML file you’re loading into your application.
This problem can happen to every people who just start to use PhoneGap to build their application. The white list concept is easy to understand, but something might be skipped, yes, I did it before and hope this may help you out from your problem.
Please feel free to share your thought below, is there any more problem about white list?