This document provides an overview of Mozilla Web Apps including:
- Web Apps can run on platforms like Windows, Mac, Android and more.
- They are built with open web technologies like HTML5, CSS, and JavaScript.
- A manifest file is needed to define the app and install it using the Mozilla Labs App Runtime extension.
- Web Apps can use features like offline storage, IndexedDB, and fullscreen mode.
32. Apache - in mime.types:
application/x-web-app-manifest+json webapp
Apache - in .htaccess:
AddType application/x-web-app-manifest+json webapp
33. NGinx - in mime.types:
application/x-web-app-manifest+json webapp;
34. IIS:
In IIS Manager, right-click the local computer, and click
Properties.
Click the MIME Types button.
Click New.
In the Extension box, type the file name extension.
In the MIME type box, type a description that exactly
matches the file type defined on the computer.
Click OK.
38. var mozApps = navigator.mozApps;
if (mozApps) {
navigator.mozApps.install(
"http://localhost/abbainfo/manifest.webapp",
{
"userID": "Robocop"
},
function () {
console.log("Worked!");
console.log(result);
},
function (result) {
console.log("Failed :-(");
console.log(result);
}
);
}
39. Errors
denied: User refuses to install the app
permissionDenied: Site is not allowed to trigger the installation
manifestURLError: URL to the manifest is malformed
networkError: app host is unreachable
manifestParseError: manifest contains syntax errors
invalidManifest: manifest contains semantic errors