XULRunner ignores updates on edited files

2019-09-06 07:31发布

问题:

I am writing a XUL application following the default structure for standalone XUL apps - that is, I have the following files:

./application.ini
./chrome
./chrome/chrome.manifest
./chrome/content
./chrome/content/main.xul
./chrome.manifest
./defaults
./defaults/preferences
./defaults/preferences/prefs.js

What bothers me is that sometimes I run my application with xulrunner, note something wrong and go change my main.xul file. However, when I run my application again with xulrunner, the presented window has not changed! After some time - usually some dozen minutes - my update appears when I run the application.

Is there some kind of cache for xulrunner? If so, could I disable it?

I am using xulrunner 2.0 on Mac OS X Snow Leopard.

回答1:

Yes, there is a XUL cache. To disable it you can add nglayout.debug.disable_xul_cache preference and set it to true. You can also run XULRunner with -purgecaches command line flag, this will clear XUL cache and all other caches as well (relevant once you move on to JavaScript modules or XPCOM components).