Norm’s blog

Blabble here, blabble there.

Archive for February, 2008

Leap day post!

The xulrunner app I developed hits a web server running on localhost to serve up its main interface, via XUL’s <browser> tag (similar to HTML’s IFRAME tag). There are instances where the pages & their dependencies should not be cached. Adding the various HTML <meta> tags (expires, pragma, cache-control) prevents the HTML pages from caching, but we really wanted to prevent .js files from being cached since we change the content dynamically in some of them so we didn’t want to return stale data. If we were running Apache, we could just set some HTTP expires headers via mod_expires but since we needed to keep the app installer as small as possible, we were using a much more lightweight web server.

I first tried the following xul prefs:

pref(”nglayout.debug.disable_xul_cache”, true);
pref(”nglayout.debug.disable_xul_fastload”, true);

which didn’t work. I was seeing .js files being saved to xulrunner’s cache (on WinXP, it was in the C:\Documents and Settings\[User name]\Local Settings\Application Data\[App Vendor]\[App Name]\Profiles\* folder)

Then it dawned on me that since we were using the XUL <browser> tag, it essentially loads up a web browser to display the content. Since that meant it was essentially Firefox 2 loading up, I looked in Firefox’s about:config for caching-related preferences and voila:

pref(”browser.cache.disk.enable”, false);

I added that to xulrunner’s prefs.js & no more caching

  • 0 Comments
  • Filed under: webdev, xulrunner
  • Get your Raptr on

    Raptr went into public beta last week. It’s been a pretty intense several months leading up to the launch, so it’s nice to actually have the cat out of the bag. And maybe I’ll see some daylight finally. :)

    Some decent coverage of the launch:

  • 0 Comments
  • Filed under: Miscellaneous
  • Upgraded apache from 2.0.59 to 2.2.8 yesterday and my htaccess rules broke. I searched around & discovered that one of the things that changed with 2.2.x was a renaming of the various apache auth modules. Had to put in the following to my httpd.conf to get things to work again

    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authz_user_module modules/mod_authz_user.so

    Other than that, everything else was easy breezy.

  • 0 Comments
  • Filed under: webdev