#3 Make it possible to skip the automatic download of .XPI-files

Onno Ekker

For my Thunderbird extension I have released some .XPI files. When a user goes to the download page, the user gets to see a timer and after the 5 seconds the download is started. Firefox then automatically tries to install the downloaded .XPI file.
The user is then prompted to allow Firefox to install the .XPI. When the user chooses Allow he gets an error message saying that the .XPI isn't compatible with Firefox. When the user doesn't allow Firefox to install the .XPI nothing happens.
Only then the user can right click on the direct link and choose to download the file. This isn't easy to find for the user and it isn't easy to explain either. On the Files page I can show download instructions, but I haven't found a way to also show these instructions on the download page. But even if I explain it to the users, I think it's bad that he needs to cancel the automatic download and start a new one.
Maybe sourceforge can scan the .XPI-file (it's just a basic zip-file), extract the install.rdf (that's an XML-file) and check to see if Firefox (UUID is {ec8030f7-c20a-464f-9b0e-13a3a9e97384}) is in the list of targetApplications.
Or maybe you can offer another way for project owners to specify (on the file details page?) that the default action should be download instead of install/execute. You can force downloading by adding a Content-Disposition: attachment header...


Apache Allura: Tickets: #4939


  • Kissaki

    Scanning for the UUID is not a good solution since the XULRuntime is an entire ecosystem of software, and an XPI can be used for addons to any such software.
    So making it UUID dependant would fix it for one, but not the other applications.

    Either using Content-Disposition always or optionally is a much better/viable solution.

    One could also see this as an issue of Firefox, which does not ask the user for optional downloading.
    Or that the user can right-click-save anyway.

  • Onno Ekker
    Onno Ekker

    I've filed mozilla bug 789732 to add a "Moz-XPI-Update: 1" header to differentiate between normal downloads and add-on updates.
    The patch for this bug is checked-in in incoming and will hopefully make it into firefox trunk anytime soon.

    I hope code can be added on the sourceforge side too, so at least add-on updates can use files from the download section.

    It probably won't help me much to prevent the install prompt when going to the download file with firefox, but at least part of my problem can be solved this way...