Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Firefox Addon from a link, instead of downloading the .xpi

I just made a FF addon and made a simple website. I'd like when a visitor clicks the "download" button the addon to install, instead of getting downloaded. It works locally, but not when I upload the site. I checked the mozilla repository, they just link to the xpi file as well.

What am I doing wrong?

like image 438
Nikolay Dyankov Avatar asked Sep 06 '12 20:09

Nikolay Dyankov


1 Answers

The problem is that you haven't registered the XPI MIME type for your website. You can do this by adding the following rule to your site's .htaccess file (assuming your site uses an Apache server):

AddType application/x-xpinstall .xpi

This should result in what you want (a user clicks the link and is prompted to install the XPI file).

Fore More Reference https://developer.mozilla.org/en-US/Add-ons/Extension_Packaging#Making_an_extension_XPI

like image 58
Jonah Bishop Avatar answered Oct 10 '22 06:10

Jonah Bishop