Same origin policy on mobile apps with HTML

There are similar rules for native mobile apps and application. Only domain needs are to be added to white list in PhoneGap or Cardova.

The device acts as a server and can access content from URL .If PhoneGap is used then domains are added to whitelist or a wildcard.

While dealing with a native application, you expect to make requests from file://, instead of from https://. However, a request is not made across the HTTP protocol, so the same rules do not apply.

Making requests from native mobile app, will allow you to make requests to any domain without any major issues.

Updated on: 30-Jul-2019


Kickstart Your Career

Get certified by completing the course

Get Started