[英]Is it possible to update HTML/CSS/JS files in a PhoneGap app with out re-deploying?
If a user has installed my PhoneGap app is there any way to update the static files such as the HTML or CSS with out the need to re-deploy the app again? 如果用户安装了我的PhoneGap应用程序,是否有任何方法可以更新静态文件(例如HTML或CSS),而无需再次重新部署该应用程序? For example, when updating a web app, the developer can make a change to a CSS file on the server, and on the next page refresh the style change will be visible to the user. 例如,更新Web应用程序时,开发人员可以在服务器上更改CSS文件,然后在下一页刷新时,样式更改将对用户可见。
I'm assuming being able to do this is unlikely due to the app needing to be packaged up and installed on the device, but I'm looking for some verification. 我认为能够执行此操作的可能性不大,因为该应用需要打包并安装在设备上,但我正在寻找一些验证方法。
You could change the app to import the file externally from a server (something like <link rel="https://linktofile.com/file.css">
, which means you can change the app's style at any time without re-compiling the app. 您可以更改应用程序以从服务器从外部导入文件(类似<link rel="https://linktofile.com/file.css">
,这意味着您可以随时更改应用程序的样式而无需重新编译该应用程序。
Otherwise I am not aware of any other way. 否则,我不知道其他任何方式。
@Stavros_S delopying a website as is suggested by Praveen Kumar is NOT best practice for mobile Apps. 按照Praveen Kumar的建议,@ Stavros_S欺骗网站不是移动应用程序的最佳做法。
Recently, Google created a new means to do what you want. 最近,Google创建了一种新方法来执行您想要的操作。 It is called an Expansion File . 它称为扩展文件 。 Read this: 读这个:
https://iphonedevlog.wordpress.com/2014/12/12/adding-an-android-apk-expansion-file-to-a-cordova-project/ https://iphonedevlog.wordpress.com/2014/12/12/adding-an-android-apk-expansion-file-to-a-cordova-project/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.