Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

WebApp bundle

In addition to passing simple command line parameters, Prism can use a zipped bundle package to install a webapp. The bundle can hold additional resources currently limited to:

  • Application INI settings
  • Application icon
  • Script for the application chrome, not the web content

Installing a bundle

When Prism opens a webapp bundle it will unpack it into the WebApps/{webapp-id} folder. This folder is located in the Application Data folder of the user's home directory on Windows, in the ~/.webapps directory on Linux and under ~/Library on OS X. Since this folder maybe be located in a directory that requires elevated privileges, the web application should not write data to it. The application profile directory can be used instead for this purpose.

Note: The webapp must have an ID in order to be installed.

When Prism is launched with a "-webapp [bundle]" command line, the bundle must first be unpacked before the web application is launched. This can slow the overall launch time and the unpacking is redundant if the bundle has been launched previously. This is why the preferred method of launching is to use the "-webapp [webapp-id]" command line, which looks for the previously installed (unpacked) web application in the Prism WebApps/{webapp-id} folder. The web application is then launched without the unpacking overhead.

A bundle can also be installed from Firefox via the Prism extension for Firefox. The extension looks for <link> tags in the webpage that point to a webapp bundle:

<link rel="webapp" href="prismdemo.webapp" title="Prism Demo">

When the extension finds such a <link> tag, it will notify the user. The user can then decide to install the webapp.

How-to

Here is a simple way to build a basic web application bundle:

  • Create file called webapp.ini that contains something like:
[Parameters]
[email protected]
name=webapp name
uri=https://[the-url-what-you-want-to-connect-to]/
status=yes
location=no
sidebar=no
navigation=no
  • Zip the file to [whatever].webapp
  • Double-click the webapp bundle or use prism -webapp [path-to-webapp]

Structure

A bundle can contain the following files. Any other files in the .webapp file will be ignored. After the .webapp file is executed the first time, these files will be unzipped and "cached" to a local directory structure.

/
  webapp.ini
  webapp.js
  webapp.css
  winnt/
    webapp.css
  darwin/
    webapp.css
  linux/
    webapp.css

  [icon].ico
  [icon].png
  [icon].icns

 

Document Tags and Contributors

Tags: 
 Contributors to this page: Sheppy, alkisg, MarkFinkle, Plasticmillion, Eff2k5
 Last updated by: Sheppy,