1. Technology
Send to a Friend via Email

Your suggestion is on its way!

An email with a link to:

http://javascript.about.com/library/bldisable1.htm

was emailed to:

Thanks for sharing About.com with others!

Permanently Disable Javascript

clr gif
Join the Discussion

Questions? Comments?

Since you are looking at adding Javascript to your web pages (why else would you be here) you may not have given much thought to those people who visit your site using browsers that don't support Javascript or where Javascript is disabled in the browser. You should want to give those visitors the best experience of your site that is possible on your site without the fancy Javascript features their browser doesn't support. To do this you will need to test your web page to see how it looks and behaves when Javascript is disabled and to do that you will need to turn Javascript off (at least temporarily) in your own web browser.

This brings us to how to actually disable (and re-enable) Javascript in the different web browsers. Opera is the friendliest browser with this as it makes the option to enable/disable Javascript easily accessible. Internet Explorer is the least friendly as the option is buried deep in the internet options under a not very obvious name. Firefox falls somewhere in between.

To disable Javascript (and other client side scripting) in Internet Explorer you need to select Internet Options from the Tools menu and then go to the Security tab. From there you select the zone that you want to disable Javascript for (eg. Internet) and then select Custom Level. Scroll down to the bottom of the list and you will find a section called Scripting and the first option there is labelled Active Scripting. Set this value to disable to disable all client side scripting languages including Javascript and then select OK to apply the change (keep selecting OK until all of the dialog windows disappear). To re-enable Javascript return here to select enable.

To disable Javascript in Firefox you need to select Options from the Tools menu and then select the Web Features tab. Here you will find a check box labelled Enable Javascript. Simply uncheck the box and select OK to disable Javascript. To re-enable Javascript return here and check the box again.

To disable Javascript in Opera you need to select Quick Preferences from the Tools menu. The sub-menu contains a checkbox labelled Enable Javascript and you simply remove the checkmark to disable Javascript. Re-check the box to enable it again.

If you find that your web page is completely non-functional with Javascript disabled then it is time to look at adding content to your page that will let your visitor's without Javascript know what is happening. At the very least you should put a message on the page telling them that your site requires Javascript to be enabled. You can do this easily by adding the following code to your web page:

<noscript>This site requires Javascript. Please enable Javascript in your browser or switch to a browser that supports Javascript in order to view this site.</noscript>

©2014 About.com. All rights reserved.