Installing and Running Old Browsers

In order to test a JavaScript program (which includes any game written using JIFFEE) on lots of different versions of many different browsers, you have to get them installed, and then you have to get JsUnit to work with them. Here are some hints to help get you past a few of the "gotchas."

All of these hints apply to recent versions of Windows, since that's the best place to do most compatibility testing.

Finding old versions

This one is easy: go to and under the heading "Web Browsers" you'll find all the old browser versions you could ever want, ready to download. Hint: You might think you should right-click on the desired link and select Save Target As..., but you'd be wrong. Do a normal left-click, because the web site needs to redirect you through an intermediate page.

What you are actually downloading is the installation program, not the browser, so once the download is complete you need to run that file.

All Browsers


When you install most browsers the installation procedure usually asks if you want a default or custom installation, and/or gives you a choice of where to install the files. If you select all the defaults the version you're installing will overwrite any existing copy of that browser. When you are installing a new version and want to replace your old one, as is typically the case, this is exactly the right thing to do.

However, if you already have a new version and you want to install an old version to do compatibility testing, this behavior will totally trash your browser. You might even have to go to the Control Panel and completely remove it to clean up the mess.

Fortunately there is an easy solution: Just specify a directory different from the default. (For some browsers you need to select custom installation; in others you can change the directory without needing to do that.) If you are installing multiple old versions, give each one its own directory.

If you have the option, also uncheck the boxes for making it the default browser and for adding it to your Start menu. Leave the box checked for creating a desktop icon, and when installation is complete rename the icon (right-click on the icon, and select Rename) to a string that contains the version number like Firefox1.5.

Internet Explorer quirks

Tight Integration with the OS

Internet Explorer, especially later versions, tends to be tightly tied to the Windows operating system. Frankly, I haven't had the courage to try to install old versions on my primary system because I'm afraid I'll irretrievably corrupt Windows. Instead, I have a couple of old obsolete (and expendable) PCs that I use to run old IE versions.

Firefox quirks

Security Restriction

This applies only to Firefox 3; earlier versions work fine without this fix.

When you try to run JsUnit, it may just hang. Look in Tools/Error Console for a message like:

Permission denied to get property Window.xbDEBUG

If that happens to you, you've been bitten by an increase in the security in the new version. The following steps will fix it: [1]

Now when you restart Firefox, JsUnit should work fine.

Chrome quirks

Security Restriction

Right from the start, the Chrome engineers deliberately chose a tighter security policy than most other browsers. It was very considerate of them to do their best to keep your browsing safe, but unfortunately it broke JsUnit. The following steps will fix it: [1]

Now when you double-click on the Chrome desktop icon, you will get a version that loosens the security just enough for JsUnit to work. (If you don't do this, it only causes a problem with cookies and persistence; the rest of the tests will still pass.)

Getting JsUnit to run

The usual way of running the tests is:

There is also an alternate way of running the tests, which is to run them directly from the web:

This method works in any browser but is especially useful for running tests on systems like mobile phones where you don't have access to the local file system. It is also handy if you just want to test a browser for compatibility without bothering to download the zip file and unzip it.

File Selection Bug

There is a neat feature in JsUnit (actually, common to most xUnit systems) that lets you browse for the HTML test file that you want to run. Unfortunately, in the latest version of JsUnit this feature is broken in some browsers (e.g. Firefox 3). The workaround is to include the full pathnames in the URL, like this:


That will bring up the page correctly, so when you click on the Run button it will do the right thing. This is annoying so I hope it gets fixed soon, but it does not affect your ability to run all the tests.

[1] You might worry that this procedure will decrease your security. It will — so be careful, and consider reverting to the original settings before you use that browser for normal web-surfing. However, I doubt these changes will result in security any worse than you had before you upgraded to the latest browser or version.