XPI ,安裝視窗(Extension Manager)沒出現!

昨天搞了個自用中文版Google Bookmarks Extension.放上網站後,自己試著下載,居然沒有出現安裝視窗.而是叫你另存新檔..怪了 🙁

只好上去拜一下google大神..發現是因為MIME TYPE不支援…只要將下列的AddType 放到httpd.conf,重新啟動apache即可.當然你的FX的cache也要清理一下.不然還是有可能看到錯誤的結果..

Making an Extension XPI (全文網址)

An XPI (XPInstall) file is simply a ZIP file containing the extension files, with the install.rdf file at the root of the ZIP. Users can download and install XPI files off an website or from a local file, by opening it or dragging it into the Extension Manager window. The MIME type recognized by Firefox for XPI files is application/x-xpinstall. Since most HTTP servers are not configured to return this MIME type for the .xpi extension by default, you will probably need to configure your HTTP server. In the Apache HTTP Server, this can be done by adding the following directive to the configuration file or .htaccess:

AddType application/x-xpinstall .xpi
當然如果網站不讓你動httpd.conf..那在加入連結時也可以.加入
AAAxpi

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料