Stavros_S
Stavros_S

Reputation: 2235

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? 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.

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.

Upvotes: 1

Views: 1035

Answers (2)

Ben Rondeau
Ben Rondeau

Reputation: 3053

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.

Otherwise I am not aware of any other way.

Upvotes: 2

user3255670
user3255670

Reputation:

@Stavros_S delopying a website as is suggested by Praveen Kumar is NOT best practice for mobile Apps.

Recently, Google created a new means to do what you want. 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/

Upvotes: 0

Related Questions