Chrome

How to Enable/Disable JavaScript on Google Chrome

JavaScript is a programming language for the web. Almost every website uses JavaScript to add different functionalities to their websites. Some websites use JavaScript to track users and collect usage data. Some websites may use JavaScript to run malicious codes on your computer. So, you may want to disable JavaScript on your browser.

Although, not all websites work without JavaScript. This is a very important thing to take into consideration when disabling JavaScript on your Google Chrome web browser. Luckily, on Google Chrome web browser, you can disable JavaScript globally (for all websites) or disable JavaScript for specific websites (that you do not trust).

In this article, I am going to show you how to enable and disable JavaScript on the Google Chrome web browser for all websites as well as specific websites.

Table of Contents:

  1. Navigating to JavaScript Settings in Google Chrome
  2. Disable JavaScript for All Websites in Google Chrome
  3. Enable JavaScript for All Websites in Google Chrome
  4. Disable JavaScript for Specific Websites in Google Chrome
  5. Enable JavaScript for Specific Websites in Google Chrome
  6. Conclusion
  7. References

Navigating to JavaScript Settings in Google Chrome

You can configure JavaScript in Google Chrome from the settings page.

To navigate to the settings page, open Google Chrome and click on

> Settings.

Click on Privacy and security > Site settings.

Click on JavaScript.

You can configure Google Chrome JavaScript settings globally and for specific websites from here.

Disable JavaScript for All Websites in Google Chrome

If you want to be very protective, you can disable JavaScript globally (for all websites) and only enable it for specific websites that you trust.

To disable JavaScript globally (for all websites), select Don’t allow sites to use JavaScript from the Default behavior section of the JavaScript settings page of Google Chrome.

Enable JavaScript for All Websites in Google Chrome

You may have specific websites that you do not trust and don’t want JavaScript enabled. In that case, you can keep JavaScript enabled globally (for all websites) and only disable it for specific websites that you do not trust.

To keep JavaScript enabled globally (for all websites), select Sites can use JavaScript from the Default behavior section of the JavaScript settings page of Google Chrome.

Disable JavaScript for Specific Websites in Google Chrome

To disable JavaScript on a domain name or subdomain of a specific website, navigate to the JavaScript settings of Google Chrome, scroll down to the Not allowed to use JavaScript section, and click on Add.

Type in the domain name or subdomain of the website on which you want to disable JavaScript in the Site section[1].

Once you are done, click on Add[2].

The domain name or subdomain of the website should be added to the Not allowed to use JavaScript list[1]. JavaScript will always be disabled on the websites listed in this section.

To remove the website from the list or reconfigure it, click on

from the right[2].

You will find the following options:

Allow: Select this if you have changed your mind and you would like to enable JavaScript for the website from now on.

Edit: Click on this option if you want to modify JavaScript settings for this website.

Remove: If you want to remove the website from the list, click on this option. Once the website is removed from the list, the default/global JavaScript settings of Google Chrome should be applied.

Enable JavaScript for Specific Websites in Google Chrome

To enable JavaScript on a domain name or subdomain of a specific website, navigate to the JavaScript settings of Google Chrome, scroll down to the Allowed to use JavaScript section, and click on Add.

Type in the domain name or subdomain of the website on which you want to enable JavaScript in the Site section[1].

Once you are done, click on Add[2].

The domain name or subdomain of the website should be added to the Allowed to use JavaScript list[1]. JavaScript will always be enabled on the websites listed in this section.

To remove the website from the list or reconfigure it, click on

from the right[2].

You will find the following options:

Block: Select this if you have changed your mind and you would like to disable JavaScript for the website from now on.

Edit: Click on this option if you want to modify JavaScript settings for this website.

Remove: If you want to remove the website from the list, click on this option. Once the website is removed from the list, the default/global JavaScript settings of Google Chrome should be applied.

Conclusion

I have shown you how to navigate to the JavaScript settings page of Google Chrome, how to enable and disable JavaScript globally (for all websites) in Google Chrome, and you how to enable and disable JavaScript for specific websites as well.

References:

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.