简体   繁体   English

用户可以在iphone或android的html 5应用程序中查看js调用的来源吗?

[英]Can a user see the source of a js call in an html 5 app for iphone or android?

If I create a html 5 application for a phone (using phonegap or Icenium) that calls a webservice which needs a username/password, can a person look at the code somehow or is the JavaScript compiled away or obstructed in some manner? 如果我为手机(使用phonegap或Icenium)创建一个html 5应用程序,该应用程序调用需要用户名/密码的web服务,那么一个人可以以某种方式查看代码,还是以某种方式编译掉或阻塞JavaScript? Assume in this case that the url is in a javascript file with username and password. 在这种情况下假设url位于带有用户名和密码的javascript文件中。

Neither Phonegap nor Icenium (both based on Apache Cordova) obfuscate or compile the JavaScript code of your app. Phonegap和Icenium(均基于Apache Cordova)都不会混淆或编译应用程序的JavaScript代码。

You can take any Cordova app for iOS or Android and simply unzip the .ipa or .apk package to reveal the HTML, CSS and JavaScript code that powers the app. 您可以使用适用于iOS或Android的任何Cordova应用程序,只需解压缩.ipa或.apk软件包即可显示支持应用程序的HTML,CSS和JavaScript代码。

If its a regular user, then most-likely not. 如果它是普通用户,那么最有可能不是。
But if you are asking this question because you want to prevent someone that is skilled want needs to see your app for code. 但是如果你问这个问题是因为你想阻止有技能想要的人需要看你的应用代码。 Then the answer is: 然后答案是:
Nothing is safe in your clients device. 您的客户端设备没有任何安全措施。 Not sqlite database, not built-int storage , and not source code( weather its compiled or not); 不是sqlite数据库,不是内置的int存储,而不是源代码(天气是否编译);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM