Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some Selinium test work, I need to keep JavaScript enabled in Firefox... yet specifically disable JavaScript's ability to launch alert boxes (Selenium doesn't yet handle them in the "onload" event). After some searching online, I found that you can do this by setting the following user preference:

user_pref("capability.policy.default.Window.alert", "noAccess");

You can put this in the user.js for a particular Firefox profile, but I don't use multiple profiles. So I added it by:

  1. putting "about:config" in my address bar
  2. right-clicking and selecting "new"
  3. adding the name-value pair above

This works! Firefox no longer supports JavaScript alert boxes. However, now that I am through testing... the issue is that I cannot UNDO this.

When I go back to "about:config", I do not find that name-value pair in the list of preferences. I likewise find nothing in "prefs.js". Where did that preference get saved? How I nuke it, and return to normal?

share|improve this question
If you have more than one profile, have you browsed all the prefs.js in each profile? I would also make sure Firefox isn't running at this time. – ngen Feb 11 '11 at 21:43
I recall some versions of Firefox having a bug where newly-created prefs would not appear in about:config until Firefox was restarted. – grawity Feb 12 '11 at 21:22
up vote 0 down vote accepted

I'm a moron. It turns out that I was looking at the "prefs.js" in the Firefox installation directory. I should have been looking at the "prefs.js" file under my home directory (the exact location may differ based on your operating system). Changes made through "about:config" are persisted in the latter location.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.