If an application is deployed using phonegap and it contains a link to an external script, does it embed that script in the application, causing a need to deploy an update to the app to update the linked script?
for example, I deploy a phone gap app with a script tag like this:
<script type="text/javascript" src="http://path-to-some-site.com/mobile-connect.js"></script>
Would I need to deploy an update to the app if I change ‘mobile-connect.js’? Or does it link out every time the app is run?
I’ve got a jquery-mobile and phonegap based app and this question intrigued me so I tested by including an online-hosted javascript into my app, and loaded the app onto my phone.
The script:
I then loaded the app, tested to see that it alerted the “BLAH!” (and it did). I then updated the alert script (hosted on my website) to:
and when I re-started the application (not re-compiled, just closed and re-opened) it alerted the new script.
So long story short, the script will be downloaded when you start the app and you can update content in your app by changing the script hosted online.