Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4240912
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:13:52+00:00 2026-05-21T03:13:52+00:00

If you are developing an extension for one of the mozilla applications (e.g. Firefox,

  • 0

If you are developing an extension for one of the mozilla applications (e.g. Firefox, Thunderbird, etc.) you define a extension id in the install.rdf.

If for some reason you need to know the extension id e.g. to retrieve the extension dir in local file system (1) or if you want to send it to a webservice (useage statistic) etc. it would be nice to get it from the install.rdf in favour to have it hardcoded in your javascript code.

But how to access the extension id from within my extension?

1) example code:

var extId = "myspecialthunderbirdextid@mydomain.com";
var filename = "install.rdf";
var file = extManager.getInstallLocation(extId).getItemFile(extId, filename);
var fullPathToFile = file.path;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:13:53+00:00Added an answer on May 21, 2026 at 3:13 am

    I’m fairly sure the ‘hard-coded ID’ should never change throughout the lifetime of an extension. That’s the entire purpose of the ID: it’s unique to that extension, permanently. Just store it as a constant and use that constant in your libraries. There’s nothing wrong with that.

    What IS bad practice is using the install.rdf, which exists for the sole purpose of… well, installing. Once the extension is developed, the install.rdf file’s state is irrelevant and could well be inconsistent.

    “An Install Manifest is the file an Add-on Manager-enabled XUL application uses to determine information about an add-on as it is being installed” [1]

    To give it an analogy, it’s like accessing the memory of a deleted object from an overflow. That object still exists in memory but it’s not logically longer relevant and using its data is a really, really bad idea.

    [1] https://developer.mozilla.org/en/install_manifests

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm developing a php extension (not my first one), but today i stumble upon
Hi everybody, I have some issue with one of my project. I'm currently developing
i'm developing a Firefox Extensions. I've included in one of mine xul jquery. Now,
I am developing a C# (targeting full framework 4) windows app. I need that
I really need your help: I have installed easphp on my laptop (apache, php,
I'm developing a solution for a client, who is dealing with a fairly typical
I'm using a few PECL installed extensions in my PHP environment. I am developing
I'm developing a website using Asp.Net 3.5 in Visual Studio 2008 and we use
I'm using netbeans, project: 'maven OSGI bundle', i have bundle activator running fine in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.