We want to help developers like you. Tell us about how you work: http://qsurvey.mozilla.com/s3/Developer-Audience-Survey-V2/?s=mdn

Manifest

Using the https://apps-preview.mozilla.org/en-US/apps/  store as the point for users to start downloading your app.

Check Apps/Build/App_Validator for validating manifest.

The store maintains a link to your manifest location.  

URL to my app files

http://garyjohnsoninfo.info//XXSoftw...atorApp.webapp
http://garyjohnsoninfo.info//XXSoftw...ulatorApp.html   // the web app
http://garyjohnsoninfo.info//XXSoftw...lator16x16.png
...

the webapp file

{
The document is expected to be UTF-8, but another encoding can be specified with a charset parameter on the Content-Type header (i.e. Content-Type: application/x-web-app-manifest+json; charset=ISO-8859-4).
Use UTF-no BOM until bug https://bugzilla.mozilla.org/show_bug.cgi?id=711538 is fixed and in your version fo Firefox (Beta, nightly, release, android)

Apache users
add the following line to a copy of the approprate .htacess file
AddType application/x-web-app-manifest+json .webapp

Delete the old .htaccess - don't overwrite.
Upload new .htaccess in ascii mode and chmod 777
}

{

manifest paths start from the domain name

  "launch_path": "/XXSoftwareTools/MEvaluator-CalculatorApp.html",
  "icons": {
    "16": "/XXSoftwareTools/images/Calculator16x16.png",
    "48": "/XXSoftwareTools/images/Calculator48x48.png",
...
}


To update your files, upload them to your server.  
new users will automatically get the new files

Existing users of your apps can delete the app and reinstall to get the changes
If you change the locations of your manifest or launch_path, this might be the safest thing to do?


Or you add an update function to the app to check for changes to the

Manifest
HTML file
other included files


If you are using the HTML5 chache, what do you do to keep the store in sych?


HTML5 chache
<html manifest="MEvaluator-CalculatorApp.appcache">
http://dev.w3.org/html5/spec/offline.html

...
When the user visits a page that declares a manifest, the browser will try to update the cache.
It does this by fetching a copy of the manifest and, if the manifest has changed since the user agent last saw it,
redownloading all the resources it mentions and caching them anew.


If you are not using the HTML 5 chache, what do they do


Sample Code to check to check for an update to a webapp file.
Note: flesh out version checking, != could work but, it does depend on change history etc.

var MANIFEST = '/XXSoftwareTools/Mvaluator-CalculatorApp.webapp';

req = new XMLHttpRequest();
req.open('GET', MANIFEST);
req.onreadystatechange = function () {
  if (req.readyState != 4) {
    return;
  }
  var appManifest = JSON.parse(req.responseText);

  navigator.mozApps.amInstalled(function (app) {
    if (app) {
      if (app.manifest.version != appManifest.version) {
        // Needs an update
        navigator.mozApps.install(MANIFEST);
      }
    } else {
      // Might want to ask user to install app
    }
  });
};

req.send();



HTML 5
AddType text/cache-manifest .appcache .manifest


The important differentiation in my mind is "hosted" vs. "packaged" apps.
W3C Widgets are for "packaged" apps where the resources are packaged in a
zip file and downloaded, Mozilla's Open Web Apps and Chrome's hosted apps
are "hosted" web apps where each of the resources are hosted on a web
server (though can be cached locally using HTML5 APIs)

Jan 7, 2011

See "An app respects the normal rules for Web caching, and may optionally use advanced mechanisms for improved start-up, like the HTML5 AppCache. Given this, there are no special considerations for updating the normal resources that an app uses. " I like Mozilla doc on html5 cache at

https://developer.mozilla.org/En/Offline_resources_in_Firefox

Document Tags and Contributors

 Contributors to this page: zalun, Gary.johnson.53
 Last updated by: zalun,