how to enable or disable javascript in mozilla firefox

JavaScript is an integral part of most modern day websites. It was not long ago that JavaScript (JS) was considered a major security concern. It still is, but the functionality that it provides to most websites far outweigh the security concerns. Also, the JS implementation has got more robust in all web browsers.

JavaScript is a programming language that is included in websites to provide certain dynamic functionality like menus, gallery lightbox, streaming media, interactive features and/or other real time data. By default, almost all browsers enable the use of JavaScript. The JavaScript code runs on the browser in the local machine rather than the server, which allows certain advantages such speed and dynamic web apps. It makes the web applications responsive and dynamic.

As JavaScript has become more popular, many of the security holes has been patched and its use is pretty secure. It is not still not uncommon for some rogue code to use the technology for nefarious purposes.

Even though I do not recommend disabling JavaScript in its entirety, you might still want to know how you can enable and disable it on your browser. Some websites will stop and will not render at all if you disable the script.

It is particularly useful when you are developing websites and web apps, so that you can test how your website renders without the JavaScript support. A well-designed and well-developed website will render reliably and degrade gracefully with a reasonable layout even without the JavaScript support.

Note that Java is not JavaScript and is a completely different web technology altogether.

Enable/Disable JavaScript Globally

You can completely disable JavaScript across all web domains. You can do that from the about:config window in Mozilla Firefox. In order to disable Javascript globally

  1. Open a new Tab
  2. Type about:config in the URL or location bar and hit Enter.
  3. Accept the warning (if one appears)
  4. Filter the list by typing javascript in the search field
  5. Look for a row with preference name javascript.enabled
  6. Change the value of the field to false by double clicking on the row
  7. Close the tab

Mozilla Firefox: Javascript Disabled


You can re-enable it using the same steps above.

As of Firefox version 23.0 and above, the option to disable JavaScript globally using the interface has been removed. The global Javascript support is always on by default. Given the extensive use of Javascript in almost all websites, it is quite possible that the above option might go away as well in future versions.

If you want much more control over how and when the JavaScript is disabled (or enabled), then you might want to use one of the Firefox Addons mentioned below. There are several addons that offers varying degree of support, but the two most popular ones are NoScript and Ghostery.

Firefox Addons

NoScript Security Suite

NoScript is a addon which gives you complete control over what executable content is run and from where. It gives you control over Java, Javascript and Flash among others and allows you to pick and choose which domains you want to whitelist. You can also enable and disable scripts globally as well as for a particular domain or even just for the current session.


Ghostery, though similar to NoScript in blocking scripts has its priority on privacy. It disables trackers, web bugs and beacons if needed. It also has an easy to use interface which allows you to whitelist some scripts or some domains.