MozillaZine

Dev : Tips : Disable XUL cache

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 17:05, 27 July 2004
Asqueella (Talk | contribs)
(bold is bad)
<-- Previous diff
Revision as of 17:40, 30 July 2004
Asqueella (Talk | contribs)

Next diff -->
Line 5: Line 5:
However even when <tt>nglayout.debug.disable_xul_cache</tt> is set to ''false'', Mozilla forbids rewriting *.jar files that contain installed extensions. You have to unpack the JAR file you want to edit and update chrome.rdf to point to the unpacked files instead of the JAR: However even when <tt>nglayout.debug.disable_xul_cache</tt> is set to ''false'', Mozilla forbids rewriting *.jar files that contain installed extensions. You have to unpack the JAR file you want to edit and update chrome.rdf to point to the unpacked files instead of the JAR:
 +===Using chrome.rdf===
'''''Important!! Backup your profile before editing chrome.rdf!''''' '''''Important!! Backup your profile before editing chrome.rdf!'''''
 +
 +We assume that the extension is installed in profile in this section. For global installation see next section.
<ol><li>Unpack the JAR file you have, say <tt>Profiles\default\extensions\{YOUR-EXTENSION'S-GUID}\my-ext.jar</tt> to the same directory. You will get (at least) <tt>Profiles\default\extensions\{YOUR-EXTENSION'S-GUID}\content</tt> directory.</li> <ol><li>Unpack the JAR file you have, say <tt>Profiles\default\extensions\{YOUR-EXTENSION'S-GUID}\my-ext.jar</tt> to the same directory. You will get (at least) <tt>Profiles\default\extensions\{YOUR-EXTENSION'S-GUID}\content</tt> directory.</li>
Line 14: Line 17:
Note, that you should also delete ''jar:'' at the beginning of the path.</li></ol> Note, that you should also delete ''jar:'' at the beginning of the path.</li></ol>
-As you may have noticed that we assume that the extension is installed in profile.+===Using installed-chrome.txt===
 +''Writeme!''
 +{{msg:stub}}

Revision as of 17:40, 30 July 2004

nglayout.debug.disable_xul_cache

nglayout.debug.disable_xul_cache is a Mozilla preference useful for extension developers. Basically when it is set to true (default), Mozilla caches chrome XUL and JavaScript (and more) in a file named XUL.mfl or similarly. Therefore, when making changes to your extension, you have to restart Mozilla in order to get new version used. As it is very inconvenient, many extension developers set this pref to false.

However even when nglayout.debug.disable_xul_cache is set to false, Mozilla forbids rewriting *.jar files that contain installed extensions. You have to unpack the JAR file you want to edit and update chrome.rdf to point to the unpacked files instead of the JAR:

Using chrome.rdf

Important!! Backup your profile before editing chrome.rdf!

We assume that the extension is installed in profile in this section. For global installation see next section.

  1. Unpack the JAR file you have, say Profiles\default\extensions\{YOUR-EXTENSION'S-GUID}\my-ext.jar to the same directory. You will get (at least) Profiles\default\extensions\{YOUR-EXTENSION'S-GUID}\content directory.
  2. In Profiles\default\chrome\chrome.rdf look for my-ext.jar! and delete it. For example replace this line
    c:baseURL="jar:file:///D:/Firefox/Profiles/default/extensions/{GUID}/chrome/my-ext.jar!/content/my-ext/"

    with this:

    c:baseURL="file:///D:/Firefox/Profiles/asqueella/extensions/{GUID}/chrome/content/my-ext/"
    Note, that you should also delete jar: at the beginning of the path.

Using installed-chrome.txt

Writeme!