Skip to content

Allow or Block JavaScript in Chrome on the Computer

Do you need to block or allow JavaScript execution in the Chrome browser on your computer? Learn how to manage JavaScript settings for websites.

Most modern websites do use JavaScript for creating an interactive website experience. However, this JavaScript can be misused by hackers to inject hacking scripts. Hence the Chrome browser has the feature to allow or disallow the JavaScript execution for all the websites or customize further to selected sites.

Configure JavaScript Execution on Chrome browser

JavaScript is one of the most used web technology on modern websites. It creates an interactive website that runs across various screen sizes. However, JavaScript can also be used for hacking the browser by injecting malicious scripts.

Hence, we must be cautious when visiting a website we aren’t aware of. And also, stay away from a website that provides hacking or illegal material. These sites mostly try to inject the code within your browser and gain access to the same.

Google Chrome has an in-built option to allow or block the JavaScript execution. You can block or allow certain websites to enable or disable JavaScript.

On this page, you can find and jump to:

Block JavaScript Execution

By default, Chrome has Javascript enabled, but you can easily disable the javascript from the settings page. Just turn off the JavaScript toggle to disable and block the execution of JavaScript. One should know how to block JavaScript on Chrome to perform this operation.

Here are the steps to block JavaScript:

  1. Launch the Chrome browser on the Computer.
  2. Click on the More vertical 3dots icon menu for options.
  3. Select Settings from the list.
  4. Scroll down to the Privacy and Security section, and select the Site settings from the menu.
  5. Choose the JavaScript option within Site settings.
  6. Click on the toggle to Block the JavaScript.
    JavaScript blocked on chrome computer

This will completely block JavaScript for all the websites. If you want to block JavaScript for any particular website or list of websites, you can add them under the Block section.

All websites listed in the Block section will automatically be blocked from running the JavaScript code.

Allow JavaScript

If you have already blocked the Javascript and the website is not loading correctly, the problem may be JavaScript blocking. In that case, just allow the JavaScript execution. Here are the steps to allow JavaScript:

  1. Launch Google Chrome on your computer.
  2. Click on the More vertical 3dots icon menu for options.
  3. Select Settings from the list.
  4. Scroll down to the Privacy and Security section, and select the Site settings from the menu.
  5. Choose the JavaScript option within Site settings.
  6. Click on the toggle button to Allow the JavaScript.
    Allow JavaScript on chrome computer

This will allow all the websites to run the JavaScript code on the browser and execute the function within the code block. However, if you want to allow JavaScript execution on a few websites, you can find all the URLs in the Allow section.

Allow JavaScript on website URL in chrome computer

The website in the allow section will run the JavaScript code irrespective of the main switch.

Bottom Line

We can easily block the JavaScript on selected sites or allow the execution in the Chrome browser. If you block the JavaScript execution, the website might not run as expected. You might find a few missing resources. Perhaps, you can block only the sites that cause issues.

Similarly, you can allow or block JavaScript in Chrome Android. You allow selected sites to enable JavaScript or block them by adding them to the Block bucket.

What sites should be blocked for JavaScript on a Chrome computer?

Lastly, if you've any thoughts or feedback, then feel free to drop in below comment box. You can also report the outdated information.

Please share the article if you find it helpful:

Disclosure: This page may contain affiliate links, which means we may receive compensation for your purchases; of course at no extra cost to you (indeed, you may get special discounts).
Kushal Azza

Kushal Azza

Kushal Azza is a Google Certified IT Professional, Digital Content Creator, and Go-To Digital Marketer. He has over a decade of experience solving tech problems, troubleshooting, and creating digital solutions. Follow him on Twitter and LinkedIn.

Leave a thought or feedback

Please leave a descriptive comment or feedback with your real name. Our human moderator vets every comment, and it may take 24 to 48 hours to get published or rejected.

Your email address will not be published, and we will never spam your inbox. Required fields are marked *