How to disable JavaScript in Firefox
Up until Firefox 22, the current stable version of the web browser, JavaScript could be turned off in the content tab of the browser's options. Here you only had to uncheck "enable JavaScript" to do so. A fast way to get there is to tap on the Alt-key, and select Tools > Options to do so.
With Firefox 23 comes a change that removes that option from the browser. It does not remove the ability to turn off JavaScript, only the menu option where it was listed in previously.
Whenever Mozilla makes a change to the browser, I'm trying to figure out why it was done. In regards to JavaScript, it appears to have been done so that inexperienced users do not turn the feature off by accident.
Firefox 22 Content menu
Firefox 23 Content menu
As you can see if you compare the two screenshots, both the option to turn off JavaScript and to block images from loading automatically have been removed from the tab.
Turn off JavaScript in Firefox
You still have a variety of options at your disposal to turn off JavaScript in the browser. I'd like to provide you with a selection of options:
- Install the QuickJS extension for Firefox. It adds a single button to a toolbar that you can click on to turn JavaScript on or off. It also makes available the shortcut Ctrl-Q to do the same.
- You can turn off JavaScript in about:config. Type about:config in Firefox's address bar and hit the enter key. Confirm you will be careful, and search for javascript.enabled there. Double-click the preference to change its value.
- From Firefox 24 on, web developers have the option to turn off JavaScript temporarily. Open the Web Console via the menu or the Ctrl-Shift-K shortcut and click on the preferences icon there. Here you find disable JavaScript under advanced settings. This disables it only for the current session though.
- Install the powerful NoScript Security Suite to turn JavaScript off for all sites by default, but with options to turn it on temporarily or permanently for select websites.
Side-effects of the change
If you have turned off JavaScript in Firefox currently and upgrade to Firefox 23 or newer, you will notice that it will automatically be turned on again without you being notified about it.
You are probably wondering why that decision was made, as it changes a user's custom configuration of the browser without notification. It is again designed for inexperienced users who have turned off the feature by accident. The reasoning here is that inexperienced users would have a hard time figuring out how to turn JavaScript back on if they made the change by accident, while experienced users will certainly be able to figure out what happened.
The advanced options of the dialog seem to be gone. I'm not entirely sure if Mozilla has added them as preferences in about:config as well. If the organization did, they do not seem to appear with a javascript tag in there.
Update
The advanced options are not gone, they are also listed in the about:config dialog.
- dom.disable_window_move_resize
- dom.disable_window_flip/li>
- dom.event.contextmenu.enabled
You find other options listed here as well. Just type in dom.disable or dom.event to take a look at those.
Closing Words
I do not think I have ever used the preference to turn off JavaScript which I can attribute 100% to the use of NoScript. I do know some users on the other hand who browse the web with JavaScript turned off by choice, and they may have a problem with Mozilla turning on JavaScript automatically in their browser when they update to Firefox 23.
Advertisement
Firefox continues to treat its new members like they are morons, isn’t that nice?
Firefox is the world’s biggest nanny. Mozilla wants to be a dictator and cares absolutely nothing about the preferences of users. That’s why I dumped Firefox and went with Pale Moon, a much better browser, backed by a developer and his assistants who care very much about their users and respond accordingly.
I can’t understand why you want to disable javascript anyway, I found it a very good move from Firefox to remove that option. If you don’t want javascript than don’t go on the internet. 99% of all sites are build within Javascript which is also the most important language.
If Mozilla is concerned with making FireFox idiot proof, they could have left the javascript controls alone, and simply put in a master reset default button.
I am seriously thinking about trying out Palemoon, which is optimized firefox for windows.
Pale Moon is a much better browser than Firefox, backed by a developer and his assistants who care very much about user preferences.
Protecting ‘inexperienced users’ from making mistakes is just an excuse, not a reason. Unless we’re supposed to believe the ludicrous suggestion that users today are thicker and less tech savvy than they 15 years ago. When it’s pretty clear that tech literacy has never been higher.
One can pretty reasonably surmise that this and the automatic updates are about ensuring the firefox ‘platform’ is a consistent target for app developers and advertisers (i.e. where firefox is trying to make more money and where it currently gets most of it’s money) and taking the control out of users hands which might mess with that ‘experience’. The few who will persevere enough to find out how to retain the functionality are inconsequential to the numbers game.
It was about the time this was disabled that we heard of javascript-requiring techniques to implement cookie-less tracking for example, And even if they were a coincidence it’s still enough reason to want to retain the function on it’s own.
Although another likely possibility is it’s just another casualty of the dumb-down-the-gui effort driven by wanna-be jobs-obsessed gui designers who keep messing up desktop software. Again nothing to do with dumb users, just egos.
In firefox 24.1.1 you have the option “javascript.enabled” true | false in about:config
Thanks…
^_^ hehehe, thanks so much guy, Its work for Ctrl+shift+K, never mind for one session…
my firefox is v.24. i need this information,,no information in my language. one again,,thanks so much…muaachhh
Thanks a lot for the discovery of the three advanced options! It saved my life (well, maybe i’m a bit overreacting, but well, I hated so much not being able anymore to tune these prefs…)
I find it very annoying if the context menu gets blocked by ignorant web designers (like on http://www.airport-grenchen.ch). It is also annoying if user settings get changed trough simple updates. Mozilla should make a “Firekitten” browser for beginners, but leave the expert settings alone! Maybe I should look at Chrome, too…. (?)
“SettingSanity by RealityRipple”
“Re-adds the options to disable Images, JavaScript, and the Tab Bar (in version 0.2) in the Options window.”
Also restores the JavaScript “Advanced” button!
https://addons.mozilla.org/en-us/firefox/addon/settingsanity/
GREAT !!
YES! Thank you Aram for pointing out that add-on. Brings back settings that I don’t use daily, but when I want them, I don’t want to have to search to remember which setting in about:config actually does what I want. There are some annoying websites that disable the right-click menu for “security” reasons to “prevent people from downloading images locally”… which don’t quite realize that “printscreen” key still works for just about everyone, and that the images are already downloaded locally somewhere in order to be displayed.
Settingsanity… it’s even slightly easier to remember than dom.argh.flarble.foo.whatever
Removing the ability to easily turn off JavaScript was a terrible thing to do to users. Many sites are bloated with JavaScript. To the point that they crash my browser. There are also security holes in many sites that use bad JavaScript. Netscape seems to have joined forces with spammers and hackers to try to force users to use JavaScript when they do not want to use it.
It’s very annoying, that firefox remove the javascript option, and image options in contents.
I occasionally find it useful to temporary turn off javascript.
I think I was also blocking urls in images.
I am very seriously considering going back to firefox 22.
These are Advanced JavaScript ‘about:config’ just hidden preferences :
Can JavaScript … Move or resize popup windows ? —> dom.disable_window_move_resize
Can JavaScript … Raise or lower windows ? —> dom.disable_window_flip
Can JavaScript … Disable or replace context menus ? —> dom.event.contextmenu.enabled
In my case, when upgrading from FF22 to FF23 all these prefs have been set to default values.
Regards.
I find that dom.event.contextmenu.enabled does not have exactly the same effect as the removed “Can JavaScript … Disable or replace context menus ?” option.
Does anyone know what is the correct setting to achieve the same effect?
Previously, with JavaScript forbidden from disabling or replacing context menus, websites could still detect a right click event and display a custom menu, but it would be obscured by the default context menu. This way, if I wanted to use the website’s own menu, I simply had to press Esc to dismiss the default menu and then select an item from the website’s menu. Now, the choice appears to be either to have the default menu or the website’s menu, but not both, which is extremely inconvenient.
Surely there must be another setting which restores the original behaviour?
Thanks, that is a great tip.
wtf those mofos removed that option where I could disable javascript overriding context menus and that stuff under the Advanced button
i can’t believe it, switching to google chrome! the mofosss!
Hi there,
I am running Firefox 22.0 on Kubuntu Linux 13.04 and … having a look at my ‘about:config’ I have found this :
pref.advanced.javascript.disable_button.advanced set by the user logical true
I wonder if setting this pref to false before upgrading to Firefox 23 would provide me the availability of the advanced button … which for me is specialy interesting to maintain due to my configuration ( Javascript On … but all three advanced options Off ).
Regards.
“Toolbar Buttons 1.0” is a very handy collection of shortcut buttons for all kinds of things including javascript. An indispensable extension.
thanks very good addon
Has anyone every have Javascipt be turned off in firefox completely on its own.
It has happened to me multiple times when I start firefox or while using firefox some how javascript gets turned off with out me doing anything.
Has this happened to anyone? anyone know why this happens to me?
This has never happened to me before.
QuickJS is a handy ad-hoc add-on indeed, though I’ve never had to use it (that is to disable javascript) otherwise than to check if an item missed by Adblocker Plus was related to a script or not.
For the fact of having the option removed from direct access (Firefox 23+), once again Mozilla is taking a bet on a new layout for beginners.
As far as I’m concerned I won’t disagree excessively with Mozilla on this point, considering it remains accessible from about:config. What always bothers me is options removed in the core.