简体   繁体   English

是否可以在不重新部署的情况下更新PhoneGap应用程序中的HTML / CSS / JS文件?

[英]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.

相关问题 在Windows Store JS / HTML / CSS应用程序中使用Phonegap / Cordova插件? - Use Phonegap/Cordova plugin in Windows Store JS/HTML/CSS app? cordova / phonegap应用程序-从服务器加载js css和html - cordova/phonegap app - load js css and html from server 如果你使用的是React.js,你还会写HTML / CSS文件吗? - Do you still write HTML/CSS files if you're using React.js? 将Durandaljs / Phonegap应用程序部署到android - Deploying a Durandaljs/Phonegap app to android Is it possible to create an HTML5 file that contains HTML, CSS, JS, NoUISlider, and Jquery code (not links to other files)? - Is it possible to create an HTML5 file that contains HTML, CSS, JS, NoUISlider, and Jquery code (not links to other files)? PhoneGap jQuery移动多个HTML文件CSS无法正常工作 - PhoneGap jQuery mobile multiple html files css not working 相关的js文件和html块的css文件 - Related js files and css files of html block 如何将外部CSS / JS文件提供给NodeJS应用显示的html文件? - How can I serve external css/js files to html files displayed by a NodeJS app? 是否可以将HTML,CSS和JavaScript(作为客户端)以及Node.js文件(服务器端)一起部署到Heroku? - Is it possible to deploy HTML, CSS and JavaScript (as client side) along with Node.js files( server side) to Heroku? 如果我让用户上传自己的 html/css/js 文件,是否存在任何可能的安全问题? - Are there any possible security issues if I let users upload their own html/css/js files?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM