PhoneGap Whitelist security mechanism navigator.app load external page back

Source: Internet
Author: User

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
1 functionloadUrl(){  
2               navigator.app.loadUrl("http://m.meilishuo.com/",{wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000});
3
4 }

PhoneGap Whitelist security mechanism navigator.app load external page back

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.