Most of the browsers will allow sites to run java script by default, but what if you find a website that might harm your machine by accessing it. You definitely don't want such websites to run java script on your browser or your machine. The default option is to run Java script which means any site can run Java script. There is an option in Google Chrome browser where you can block or allow a specific site from running Java script.
Follow the below mentioned steps to allow or block a site from running Java script.
- Go to Chrome browser settings and navigate to 'Show advanced settings'.
- Under Privacy, click on 'Content settings..'.
- Under content settings, you will find 'Java Script' enabled by default for all sites to run.
- If you don't want any of the sites to run Java script then there is another option to disable this, but this is not recommended.
- In addition to these two, there is a third option called 'Manage Exceptions'.
- In the Java script manage exception pop-up window enter the host name pattern as shown below in the image and select the behavior.
- Note that when you enter the host name pattern, there are multiple ways you can enter this value. If you want to create exceptions for the entire domain (like google.com) then insert [*.] before entering the domain name. As an example: [*.]google.com which will match mail.google.com, plus.google.com etc.
- In addition to this you can even specify IPV6 address or the IP address or a non-http URL.
- You can always come back to this settings and remove all the exceptions that you have created.
I would recommend to keep the default settings as it is. But say, if you are testing something and you want to stop running java script or it's pop-up window from appearing, then you can always add the site to exception list. Don't forget to remove these sites from the list once this job of testing is done.
No comments:
Post a Comment