Developers › Dev.Opera

Packing and deploying your Opera Widget - Opera Developer Community

November 13, 2006 · by Opera Software

When your widget is finished, what remains is to deploy it, and make it available for all to see.

Packing

As mentioned earlier, widgets are packed using the zip format (using .wdgt extension), with the config.xml and index.html in the root folder of the archive. Any other files you use in the widget can be located anywhere within the widget archive file.

Deploying: Opera Widgets

By far, the easiest way to deploy your widget, is to upload it to the Opera Widgets site, where Opera Widget users will have access to your widgets in a matter of hours.

Deploying: On the Web

If you wish to deploy the widget on your own server, widgets should be served with the Content-Type: application/x-opera-widgets. An Apache user can add the following to a .htaccess file in the folder where the widgets are stored:

AddType application/x-opera-widgets .zip

To make a widget icon appear in Opera's address bar and retrieve your widget instantly, use the following code in the header of your HTML page:

<link rel="alternate" 
  type="application/x-opera-widgets" 
  title="[widget name]"
  href="[widget url]" />

Running a deployed widget

Provided the widget is served with the correct Content-Type, Opera will automatically ask the user whether he/she wants to install the widget when the user clicks on a widget on a Web page. When the widget is deployed on the Opera Widgets site, the end-user can easily find and download your widget from the "Add Widget" entry in Opera's Widget menu.

About this article

Published inDev.Opera
DateNovember 13, 2006
AuthorOpera Software
Tagswidget
OriginalInternet Archive