Learning Essentials:
1. Phonegap Whitelist Security mechanism
2. Navigator.app Object loading external page return to parent page
I. PHONEGAP Whitelist security mechanism
PhoneGap app pages are mostly local, but sometimes need to load external Web pages into the app's built-in browser view to complete specific app functionality, for security reasons, PHONEGAP has set up a whitelist security mechanism that controls the source of content that can be loaded into the built-in browser view.
Android does not use the whitelist security mechanism to invoke an external browser
IOS will reject the whitelist if it is not safe.
Android configuration res/xml/config.xml IOS Configuration and WP7/WP8 View document http://www.phonegap100.com/doc/guide_whitelist_index.md.html# DOMAIN%20WHITELIST%20GU IDE
ii. Navigator.app Main object of the exposition
NAVIGATOR.APP.LOADURL () in the application that loads the Web page or in the system's default browser
NAVIGATOR.APP.CANCELLOADURL () cancel loading before the Web page loads successfully
Navigator.app.backHistory () returns to the previous browse page
Navigator.app.clearHistory () Empty browsing history
Navigator.app.clearCache () emptying the program's resource file cache
NAVIGATOR.APP.EXITAPP () Exit application
Navigator.splashscreen.show ();
Navigator.splashscreen.hide ();
Navigator.app.loadUrl
Cancelloadurl Cancel Load URL
View Source
2 |
navigator.app.loadUrl( "http://m.meilishuo.com/" ,{wait:2000, loadingDialog: "Wait,Loading App" , loadUrlTimeoutValue: 60000}); |
PhoneGap Whitelist security mechanism navigator.app load external page back