David Baron have posted first a perl script to help finding memory leaks on Mozilla Firefox and after experiencing few problems with the script on windows he released a Javascript version. Certainly a lot of Firefox users today are complaining about memory leaks including myself, specially if I left firefox working the next day I find something about 300Mo of memory used, so everytime I need to restart firefox and be sure that it will store my session so I can get the tabs again when restarted …

It didn’t even occur to me when writing leak-gauge.pl that many Windows users wouldn’t already have perl installed. I’m so used to having it available everywhere, since whenever I deal with a Windows machine it’s as a development environment.
So I’ve now written a version of the same script in JavaScript and HTML, so that users don’t need to go through the trouble of installing perl to use leak-gauge.pl. (Coincidentally, the early versions of leak-gauge.pl also didn’t work on Windows; that’s fixed now.)


The process of using this script is a little more complicated, since you need to either:
* Copy the log file to a different name before restarting the browser to load this page, or
* Restart the browser without the environment variables set after exiting the process in which you were detecting leaks (which did have the environment variables set)
The script is also Mozilla-specific and must be downloaded to a local file (with .htm or .html extension) and granted additional privileges when run (something that’s equivalent to installing software) as noted David. Note also that if file upload controls allowed script in the page to read the file, the elevated privileges this script needs would not be needed — it’s using them only to read a file in.