Dev : Tips : Disable XUL cache: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
 
(redirect to devmo, all the up-to-date info is there minus the overlay reload thing, which sounds kinda iffy)
 
(29 intermediate revisions by 12 users not shown)
Line 1: Line 1:
==nglayout.debug.disable_xul_cache==
See [http://developer.mozilla.org/en/docs/Setting_up_extension_development_environment Setting up extension development environment] at [http://developer.mozilla.org MDC].


'''nglayout.debug.disable_xul_cache''' is a Mozilla [[Firefox : FAQs : Edit Config|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''.
[[Category:Redirects]]
 
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:
 
'''''Important!! Backup your profile before editing chrome.rdf!'''''
 
<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>
<li>In <tt>Profiles\default\chrome\chrome.rdf</tt> look for ''my-ext.jar!'' and delete it. For example replace this line
<pre>c:baseURL="jar:file:///D:/Firefox/Profiles/default/extensions/{GUID}/chrome/my-ext.jar!/content/my-ext/"</pre>
with this:
<pre>c:baseURL="file:///D:/Firefox/Profiles/asqueella/extensions/{GUID}/chrome/content/my-ext/"</pre>
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.

Latest revision as of 19:53, 23 May 2007